| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
H2JVM.Internal.Raw.ClassFile
Description
The internal, mostly JVM-spec matching representation of a class file.
Synopsis
- data BootstrapMethod = BootstrapMethod {
- bootstrapMethodRef :: Word16
- bootstrapArguments :: Vector Word16
- data FieldInfo = FieldInfo {
- accessFlags :: Word16
- nameIndex :: Word16
- descriptorIndex :: Word16
- attributes :: Vector AttributeInfo
- data MethodInfo = MethodInfo {
- accessFlags :: Word16
- nameIndex :: Word16
- descriptorIndex :: Word16
- attributes :: Vector AttributeInfo
- data ClassFile = ClassFile {
- magic :: Word32
- minorVersion :: MinorVersion
- majorVersion :: MajorVersion
- constantPool :: Vector ConstantPoolInfo
- accessFlags :: Word16
- thisClass :: Word16
- superClass :: Word16
- interfaces :: Vector Word16
- fields :: Vector FieldInfo
- methods :: Vector MethodInfo
- attributes :: Vector AttributeInfo
- data VerificationTypeInfo
- data Attribute
- = CodeAttribute {
- maxStack :: Word16
- maxLocals :: Word16
- code :: Vector Instruction
- exceptionTable :: Vector ExceptionTableEntry
- codeAttributes :: Vector AttributeInfo
- | InnerClassesAttribute (Vector InnerClassInfo)
- | LineNumberTableAttribute (Vector LineNumberTableEntry)
- | StackMapTableAttribute (Vector StackMapFrame)
- | ConstantValueAttribute Word16
- | SourceFileAttribute Word16
- | BootstrapMethodsAttribute (Vector BootstrapMethod)
- | SyntheticAttribute
- = CodeAttribute {
- data AttributeInfo = AttributeInfo {}
- data LineNumberTableEntry = LineNumberTableEntry {
- startPc :: U2
- lineNumber :: U2
- data StackMapFrame
- data ExceptionTableEntry = ExceptionTableEntry {}
- data InnerClassInfo = InnerClassInfo {}
Documentation
data BootstrapMethod Source #
Constructors
| BootstrapMethod | |
Fields
| |
Instances
| Show BootstrapMethod Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods showsPrec :: Int -> BootstrapMethod -> ShowS # show :: BootstrapMethod -> String # showList :: [BootstrapMethod] -> ShowS # | |
| Eq BootstrapMethod Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods (==) :: BootstrapMethod -> BootstrapMethod -> Bool # (/=) :: BootstrapMethod -> BootstrapMethod -> Bool # | |
| Ord BootstrapMethod Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods compare :: BootstrapMethod -> BootstrapMethod -> Ordering # (<) :: BootstrapMethod -> BootstrapMethod -> Bool # (<=) :: BootstrapMethod -> BootstrapMethod -> Bool # (>) :: BootstrapMethod -> BootstrapMethod -> Bool # (>=) :: BootstrapMethod -> BootstrapMethod -> Bool # max :: BootstrapMethod -> BootstrapMethod -> BootstrapMethod # min :: BootstrapMethod -> BootstrapMethod -> BootstrapMethod # | |
Constructors
| FieldInfo | |
Fields
| |
Instances
data MethodInfo Source #
Constructors
| MethodInfo | |
Fields
| |
Instances
| Show MethodInfo Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods showsPrec :: Int -> MethodInfo -> ShowS # show :: MethodInfo -> String # showList :: [MethodInfo] -> ShowS # | |
| WriteBinary MethodInfo Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods writeBinary :: MethodInfo -> Put Source # | |
Low level representation of the class file format. This is the closest representation to the actual format of the class file, that makes only a few compromises for convenience, such as omitting the explicit x_count fields, instead calculating them from the length of the corresponding vectors. This has the added bonus of making it impossible to construct an invalid class file (in this regard anyway)
Constructors
| ClassFile | |
Fields
| |
Instances
data VerificationTypeInfo Source #
Constructors
| TopVariableInfo | |
| IntegerVariableInfo | |
| FloatVariableInfo | |
| LongVariableInfo | |
| DoubleVariableInfo | |
| NullVariableInfo | |
| UninitializedThisVariableInfo | |
| ObjectVariableInfo Word16 | |
| UninitializedVariableInfo U2 |
Instances
| Show VerificationTypeInfo Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods showsPrec :: Int -> VerificationTypeInfo -> ShowS # show :: VerificationTypeInfo -> String # showList :: [VerificationTypeInfo] -> ShowS # | |
Constructors
| CodeAttribute | |
Fields
| |
| InnerClassesAttribute (Vector InnerClassInfo) | |
| LineNumberTableAttribute (Vector LineNumberTableEntry) | |
| StackMapTableAttribute (Vector StackMapFrame) | |
| ConstantValueAttribute Word16 | |
| SourceFileAttribute Word16 | |
| BootstrapMethodsAttribute (Vector BootstrapMethod) | |
| SyntheticAttribute | |
data AttributeInfo Source #
Constructors
| AttributeInfo | |
Instances
| Show AttributeInfo Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods showsPrec :: Int -> AttributeInfo -> ShowS # show :: AttributeInfo -> String # showList :: [AttributeInfo] -> ShowS # | |
| WriteBinary AttributeInfo Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods writeBinary :: AttributeInfo -> Put Source # | |
data LineNumberTableEntry Source #
Constructors
| LineNumberTableEntry | |
Fields
| |
Instances
| Show LineNumberTableEntry Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods showsPrec :: Int -> LineNumberTableEntry -> ShowS # show :: LineNumberTableEntry -> String # showList :: [LineNumberTableEntry] -> ShowS # | |
data StackMapFrame Source #
The stack map frame types are defined as follows: > union stack_map_frame { > same_frame; > same_locals_1_stack_item_frame; > same_locals_1_stack_item_frame_extended; > chop_frame; > same_frame_extended; > append_frame; > full_frame; >}
Constructors
| SameFrame U1 | 0-63 |
| SameLocals1StackItemFrame VerificationTypeInfo U1 | same_locals_1_stack_item_frame {
u1 frame_type = SAME_LOCALS_1_STACK_ITEM; /* 64-127 */
verification_type_info stack[1];
} |
| SameLocals1StackItemFrameExtended VerificationTypeInfo U2 | |
| SameFrameExtended U2 | |
| ChopFrame U1 U2 | |
| AppendFrame (Vector VerificationTypeInfo) U2 | |
| FullFrame (Vector VerificationTypeInfo) (Vector VerificationTypeInfo) U2 |
Instances
| Show StackMapFrame Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods showsPrec :: Int -> StackMapFrame -> ShowS # show :: StackMapFrame -> String # showList :: [StackMapFrame] -> ShowS # | |
data ExceptionTableEntry Source #
Constructors
| ExceptionTableEntry | |
Instances
| Show ExceptionTableEntry Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods showsPrec :: Int -> ExceptionTableEntry -> ShowS # show :: ExceptionTableEntry -> String # showList :: [ExceptionTableEntry] -> ShowS # | |
| WriteBinary ExceptionTableEntry Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods writeBinary :: ExceptionTableEntry -> Put Source # | |
data InnerClassInfo Source #
Constructors
| InnerClassInfo | |
Fields
| |
Instances
| Show InnerClassInfo Source # | |
Defined in H2JVM.Internal.Raw.ClassFile Methods showsPrec :: Int -> InnerClassInfo -> ShowS # show :: InnerClassInfo -> String # showList :: [InnerClassInfo] -> ShowS # | |