| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
H2JVM.ClassFile.Method
Description
High level representation of methods in a class file, including their attributes and code.
Synopsis
- data CodeAttribute
- data StackMapFrame
- data VerificationTypeInfo
- data LineNumberTableEntry = LineNumberTableEntry {}
- data ClassFileMethod = ClassFileMethod {}
- newtype MethodAttribute = Code CodeAttributeData
- data ExceptionTableEntry = ExceptionTableEntry {}
- data CodeAttributeData = CodeAttributeData {}
Documentation
data CodeAttribute Source #
Additional properties of the compiled method bytecode.
Constructors
| LineNumberTable [LineNumberTableEntry] | Line number information for debugging stack traces. |
| StackMapTable [StackMapFrame] | Stack map frame table for JVM verification. |
Instances
data StackMapFrame Source #
Represents a JVM stack map frame table entry.
Constructors
| SameFrame Label | The frame has the same local variables and an empty operand stack. |
| ChopFrame | The operand stack is empty, and the last |
| SameLocals1StackItemFrame !VerificationTypeInfo Label | The frame has the same local variables and exactly one operand stack item. |
| AppendFrame ![VerificationTypeInfo] !Label | The operand stack is empty, and new local variables are appended. |
| FullFrame ![VerificationTypeInfo] ![VerificationTypeInfo] !Label | Complete frame specification describing both locals and operand stack. |
Instances
| Data StackMapFrame Source # | |
Defined in H2JVM.ClassFile.Method Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StackMapFrame -> c StackMapFrame # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StackMapFrame # toConstr :: StackMapFrame -> Constr # dataTypeOf :: StackMapFrame -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StackMapFrame) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackMapFrame) # gmapT :: (forall b. Data b => b -> b) -> StackMapFrame -> StackMapFrame # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StackMapFrame -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StackMapFrame -> r # gmapQ :: (forall d. Data d => d -> u) -> StackMapFrame -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> StackMapFrame -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StackMapFrame -> m StackMapFrame # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StackMapFrame -> m StackMapFrame # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StackMapFrame -> m StackMapFrame # | |
| Show StackMapFrame Source # | |
Defined in H2JVM.ClassFile.Method Methods showsPrec :: Int -> StackMapFrame -> ShowS # show :: StackMapFrame -> String # showList :: [StackMapFrame] -> ShowS # | |
| Eq StackMapFrame Source # | |
Defined in H2JVM.ClassFile.Method Methods (==) :: StackMapFrame -> StackMapFrame -> Bool # (/=) :: StackMapFrame -> StackMapFrame -> Bool # | |
| Pretty StackMapFrame Source # | |
Defined in H2JVM.ClassFile.Method | |
data VerificationTypeInfo Source #
Verification type metadata for a stack or local variable slot.
Constructors
| TopVariableInfo | Unusable or uninitialised slot. |
| IntegerVariableInfo | An 32-bit integer or smaller type (boolean, byte, char, short). |
| FloatVariableInfo | A 32-bit single-precision floating point. |
| LongVariableInfo | A 64-bit long integer. |
| DoubleVariableInfo | A 64-bit double-precision floating point. |
| NullVariableInfo | The null reference. |
| UninitializedThisVariableInfo | An uninitialised reference of the current class constructor context. |
| ObjectVariableInfo !ClassInfoType | A reference to an object of the specified class. |
| UninitializedVariableInfo !Label | An uninitialised reference to an object allocated by a |
Instances
| Data VerificationTypeInfo Source # | |
Defined in H2JVM.ClassFile.Method Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VerificationTypeInfo -> c VerificationTypeInfo # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c VerificationTypeInfo # toConstr :: VerificationTypeInfo -> Constr # dataTypeOf :: VerificationTypeInfo -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c VerificationTypeInfo) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VerificationTypeInfo) # gmapT :: (forall b. Data b => b -> b) -> VerificationTypeInfo -> VerificationTypeInfo # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VerificationTypeInfo -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VerificationTypeInfo -> r # gmapQ :: (forall d. Data d => d -> u) -> VerificationTypeInfo -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> VerificationTypeInfo -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> VerificationTypeInfo -> m VerificationTypeInfo # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VerificationTypeInfo -> m VerificationTypeInfo # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VerificationTypeInfo -> m VerificationTypeInfo # | |
| Show VerificationTypeInfo Source # | |
Defined in H2JVM.ClassFile.Method Methods showsPrec :: Int -> VerificationTypeInfo -> ShowS # show :: VerificationTypeInfo -> String # showList :: [VerificationTypeInfo] -> ShowS # | |
| Eq VerificationTypeInfo Source # | |
Defined in H2JVM.ClassFile.Method Methods (==) :: VerificationTypeInfo -> VerificationTypeInfo -> Bool # (/=) :: VerificationTypeInfo -> VerificationTypeInfo -> Bool # | |
| Pretty VerificationTypeInfo Source # | |
Defined in H2JVM.ClassFile.Method Methods pretty :: VerificationTypeInfo -> Doc ann Source # prettyList :: [VerificationTypeInfo] -> Doc ann Source # | |
data LineNumberTableEntry Source #
Map a JVM bytecode offset to a source code line number.
Constructors
| LineNumberTableEntry | |
Fields
| |
Instances
| Data LineNumberTableEntry Source # | |
Defined in H2JVM.ClassFile.Method Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LineNumberTableEntry -> c LineNumberTableEntry # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LineNumberTableEntry # toConstr :: LineNumberTableEntry -> Constr # dataTypeOf :: LineNumberTableEntry -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LineNumberTableEntry) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LineNumberTableEntry) # gmapT :: (forall b. Data b => b -> b) -> LineNumberTableEntry -> LineNumberTableEntry # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LineNumberTableEntry -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LineNumberTableEntry -> r # gmapQ :: (forall d. Data d => d -> u) -> LineNumberTableEntry -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> LineNumberTableEntry -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LineNumberTableEntry -> m LineNumberTableEntry # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LineNumberTableEntry -> m LineNumberTableEntry # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LineNumberTableEntry -> m LineNumberTableEntry # | |
| Show LineNumberTableEntry Source # | |
Defined in H2JVM.ClassFile.Method Methods showsPrec :: Int -> LineNumberTableEntry -> ShowS # show :: LineNumberTableEntry -> String # showList :: [LineNumberTableEntry] -> ShowS # | |
| Eq LineNumberTableEntry Source # | |
Defined in H2JVM.ClassFile.Method Methods (==) :: LineNumberTableEntry -> LineNumberTableEntry -> Bool # (/=) :: LineNumberTableEntry -> LineNumberTableEntry -> Bool # | |
| Pretty LineNumberTableEntry Source # | |
Defined in H2JVM.ClassFile.Method Methods pretty :: LineNumberTableEntry -> Doc ann Source # prettyList :: [LineNumberTableEntry] -> Doc ann Source # | |
data ClassFileMethod Source #
A high level representation of a method in a class file.
Constructors
| ClassFileMethod | |
Fields
| |
Instances
| Show ClassFileMethod Source # | |
Defined in H2JVM.ClassFile.Method Methods showsPrec :: Int -> ClassFileMethod -> ShowS # show :: ClassFileMethod -> String # showList :: [ClassFileMethod] -> ShowS # | |
| Pretty ClassFileMethod Source # | |
Defined in H2JVM.ClassFile.Method Methods pretty :: ClassFileMethod -> Doc ann Source # prettyList :: [ClassFileMethod] -> Doc ann Source # | |
newtype MethodAttribute Source #
An attribute of a method.
Constructors
| Code CodeAttributeData | The bytecode instructions and execution context of the method body. |
Instances
| Data MethodAttribute Source # | |||||
Defined in H2JVM.ClassFile.Method Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MethodAttribute -> c MethodAttribute # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MethodAttribute # toConstr :: MethodAttribute -> Constr # dataTypeOf :: MethodAttribute -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MethodAttribute) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MethodAttribute) # gmapT :: (forall b. Data b => b -> b) -> MethodAttribute -> MethodAttribute # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MethodAttribute -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MethodAttribute -> r # gmapQ :: (forall d. Data d => d -> u) -> MethodAttribute -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MethodAttribute -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MethodAttribute -> m MethodAttribute # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MethodAttribute -> m MethodAttribute # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MethodAttribute -> m MethodAttribute # | |||||
| Generic MethodAttribute Source # | |||||
Defined in H2JVM.ClassFile.Method Associated Types
Methods from :: MethodAttribute -> Rep MethodAttribute x # to :: Rep MethodAttribute x -> MethodAttribute # | |||||
| Show MethodAttribute Source # | |||||
Defined in H2JVM.ClassFile.Method Methods showsPrec :: Int -> MethodAttribute -> ShowS # show :: MethodAttribute -> String # showList :: [MethodAttribute] -> ShowS # | |||||
| DataMergeable MethodAttribute Source # | |||||
Defined in H2JVM.ClassFile.Method Methods merge :: MethodAttribute -> MethodAttribute -> MethodAttribute Source # | |||||
| Pretty MethodAttribute Source # | |||||
Defined in H2JVM.ClassFile.Method Methods pretty :: MethodAttribute -> Doc ann Source # prettyList :: [MethodAttribute] -> Doc ann Source # | |||||
| type Rep MethodAttribute Source # | |||||
Defined in H2JVM.ClassFile.Method type Rep MethodAttribute = D1 ('MetaData "MethodAttribute" "H2JVM.ClassFile.Method" "h2jvm-0.1.0.0-LWhbtWHvrTPFtGJV7ONYMS" 'True) (C1 ('MetaCons "Code" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CodeAttributeData))) | |||||
data ExceptionTableEntry Source #
An entry in the method's exception handler table.
Constructors
| ExceptionTableEntry | |
Fields
| |
Instances
| Data ExceptionTableEntry Source # | |||||
Defined in H2JVM.ClassFile.Method Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ExceptionTableEntry -> c ExceptionTableEntry # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ExceptionTableEntry # toConstr :: ExceptionTableEntry -> Constr # dataTypeOf :: ExceptionTableEntry -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ExceptionTableEntry) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ExceptionTableEntry) # gmapT :: (forall b. Data b => b -> b) -> ExceptionTableEntry -> ExceptionTableEntry # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ExceptionTableEntry -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ExceptionTableEntry -> r # gmapQ :: (forall d. Data d => d -> u) -> ExceptionTableEntry -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ExceptionTableEntry -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ExceptionTableEntry -> m ExceptionTableEntry # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ExceptionTableEntry -> m ExceptionTableEntry # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ExceptionTableEntry -> m ExceptionTableEntry # | |||||
| Generic ExceptionTableEntry Source # | |||||
Defined in H2JVM.ClassFile.Method Associated Types
Methods from :: ExceptionTableEntry -> Rep ExceptionTableEntry x # to :: Rep ExceptionTableEntry x -> ExceptionTableEntry # | |||||
| Show ExceptionTableEntry Source # | |||||
Defined in H2JVM.ClassFile.Method Methods showsPrec :: Int -> ExceptionTableEntry -> ShowS # show :: ExceptionTableEntry -> String # showList :: [ExceptionTableEntry] -> ShowS # | |||||
| Pretty ExceptionTableEntry Source # | |||||
Defined in H2JVM.ClassFile.Method Methods pretty :: ExceptionTableEntry -> Doc ann Source # prettyList :: [ExceptionTableEntry] -> Doc ann Source # | |||||
| type Rep ExceptionTableEntry Source # | |||||
Defined in H2JVM.ClassFile.Method type Rep ExceptionTableEntry = D1 ('MetaData "ExceptionTableEntry" "H2JVM.ClassFile.Method" "h2jvm-0.1.0.0-LWhbtWHvrTPFtGJV7ONYMS" 'False) (C1 ('MetaCons "ExceptionTableEntry" 'PrefixI 'True) ((S1 ('MetaSel ('Just "startPc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "endPc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "handlerPc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "catchType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ClassInfoType))))) | |||||
data CodeAttributeData Source #
The data contained in a Code attribute.
Constructors
| CodeAttributeData | |
Fields
| |
Instances
| Data CodeAttributeData Source # | |||||
Defined in H2JVM.ClassFile.Method Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CodeAttributeData -> c CodeAttributeData # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CodeAttributeData # toConstr :: CodeAttributeData -> Constr # dataTypeOf :: CodeAttributeData -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CodeAttributeData) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CodeAttributeData) # gmapT :: (forall b. Data b => b -> b) -> CodeAttributeData -> CodeAttributeData # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CodeAttributeData -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CodeAttributeData -> r # gmapQ :: (forall d. Data d => d -> u) -> CodeAttributeData -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CodeAttributeData -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CodeAttributeData -> m CodeAttributeData # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CodeAttributeData -> m CodeAttributeData # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CodeAttributeData -> m CodeAttributeData # | |||||
| Generic CodeAttributeData Source # | |||||
Defined in H2JVM.ClassFile.Method Associated Types
Methods from :: CodeAttributeData -> Rep CodeAttributeData x # to :: Rep CodeAttributeData x -> CodeAttributeData # | |||||
| Show CodeAttributeData Source # | |||||
Defined in H2JVM.ClassFile.Method Methods showsPrec :: Int -> CodeAttributeData -> ShowS # show :: CodeAttributeData -> String # showList :: [CodeAttributeData] -> ShowS # | |||||
| DataMergeable CodeAttributeData Source # | |||||
Defined in H2JVM.ClassFile.Method Methods merge :: CodeAttributeData -> CodeAttributeData -> CodeAttributeData Source # | |||||
| Pretty CodeAttributeData Source # | |||||
Defined in H2JVM.ClassFile.Method Methods pretty :: CodeAttributeData -> Doc ann Source # prettyList :: [CodeAttributeData] -> Doc ann Source # | |||||
| type Rep CodeAttributeData Source # | |||||
Defined in H2JVM.ClassFile.Method type Rep CodeAttributeData = D1 ('MetaData "CodeAttributeData" "H2JVM.ClassFile.Method" "h2jvm-0.1.0.0-LWhbtWHvrTPFtGJV7ONYMS" 'False) (C1 ('MetaCons "CodeAttributeData" 'PrefixI 'True) ((S1 ('MetaSel ('Just "maxStack") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2) :*: S1 ('MetaSel ('Just "maxLocals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 U2)) :*: (S1 ('MetaSel ('Just "code") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Instruction)) :*: (S1 ('MetaSel ('Just "exceptionTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ExceptionTableEntry]) :*: S1 ('MetaSel ('Just "codeAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [CodeAttribute]))))) | |||||