jvm-binary-0.9.0: A library for reading Java class-files

Copyright(c) Christian Gram Kalhauge 2018
LicenseMIT
Maintainerkalhuage@cs.ucla.edu
Safe HaskellNone
LanguageHaskell2010

Language.JVM.ConstantPool

Contents

Description

This module contains the ConstantPool data structure and multiple other types, and classes.

Synopsis

Constant Pool

The ConstantPool contains all the constants, and is accessible using the Lookup methods.

newtype ConstantPool r Source #

A ConstantPool is just an IntMap. A IntMap is used, because constants are accessed using their byte-offset, and sometimes the offset depends on the constant size. See constantSize.

Constructors

ConstantPool 
Instances
Eq (ConstantPool High) Source # 
Instance details

Defined in Language.JVM.ConstantPool

Eq (ConstantPool Low) Source # 
Instance details

Defined in Language.JVM.ConstantPool

Ord (ConstantPool Low) Source # 
Instance details

Defined in Language.JVM.ConstantPool

Show (ConstantPool High) Source # 
Instance details

Defined in Language.JVM.ConstantPool

Show (ConstantPool Low) Source # 
Instance details

Defined in Language.JVM.ConstantPool

Generic (ConstantPool High) Source # 
Instance details

Defined in Language.JVM.ConstantPool

Associated Types

type Rep (ConstantPool High) :: Type -> Type #

Generic (ConstantPool Low) Source # 
Instance details

Defined in Language.JVM.ConstantPool

Associated Types

type Rep (ConstantPool Low) :: Type -> Type #

Binary (ConstantPool Low) Source # 
Instance details

Defined in Language.JVM.ConstantPool

NFData (ConstantPool High) Source # 
Instance details

Defined in Language.JVM.ConstantPool

Methods

rnf :: ConstantPool High -> () #

NFData (ConstantPool Low) Source # 
Instance details

Defined in Language.JVM.ConstantPool

Methods

rnf :: ConstantPool Low -> () #

type Rep (ConstantPool High) Source # 
Instance details

Defined in Language.JVM.ConstantPool

type Rep (ConstantPool High) = D1 (MetaData "ConstantPool" "Language.JVM.ConstantPool" "jvm-binary-0.9.0-9S1OjG3yP2JAIJl8zf6L4B" True) (C1 (MetaCons "ConstantPool" PrefixI True) (S1 (MetaSel (Just "unConstantPool") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (IntMap (Constant High)))))
type Rep (ConstantPool Low) Source # 
Instance details

Defined in Language.JVM.ConstantPool

type Rep (ConstantPool Low) = D1 (MetaData "ConstantPool" "Language.JVM.ConstantPool" "jvm-binary-0.9.0-9S1OjG3yP2JAIJl8zf6L4B" True) (C1 (MetaCons "ConstantPool" PrefixI True) (S1 (MetaSel (Just "unConstantPool") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (IntMap (Constant Low)))))

access :: Index -> ConstantPool r -> Either PoolAccessError (Constant r) Source #

Access a constant in the constant pool

empty :: ConstantPool r Source #

Creates an empty constant pool

data PoolAccessError Source #

A pool access error

Constructors

PoolAccessError 
Instances
Eq PoolAccessError Source # 
Instance details

Defined in Language.JVM.ConstantPool

Show PoolAccessError Source # 
Instance details

Defined in Language.JVM.ConstantPool

Generic PoolAccessError Source # 
Instance details

Defined in Language.JVM.ConstantPool

Associated Types

type Rep PoolAccessError :: Type -> Type #

NFData PoolAccessError Source # 
Instance details

Defined in Language.JVM.ConstantPool

Methods

rnf :: PoolAccessError -> () #

type Rep PoolAccessError Source # 
Instance details

Defined in Language.JVM.ConstantPool

type Rep PoolAccessError = D1 (MetaData "PoolAccessError" "Language.JVM.ConstantPool" "jvm-binary-0.9.0-9S1OjG3yP2JAIJl8zf6L4B" False) (C1 (MetaCons "PoolAccessError" PrefixI True) (S1 (MetaSel (Just "paErrorRef") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Word16) :*: S1 (MetaSel (Just "paErrorMsg") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))

type Index = Word16 Source #

An index into the constant pool.