| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
JVM.Data.Raw.ClassFile
Synopsis
- 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 FieldInfo = FieldInfo {
- accessFlags :: Word16
- nameIndex :: Word16
- descriptorIndex :: Word16
- attributes :: Vector AttributeInfo
- data AttributeInfo = AttributeInfo {}
- 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)
- = CodeAttribute {
- data InnerClassInfo = InnerClassInfo {}
- data LineNumberTableEntry = LineNumberTableEntry {
- startPc :: U2
- lineNumber :: U2
- data StackMapFrame
- data VerificationTypeInfo
- data BootstrapMethod = BootstrapMethod {
- bootstrapMethodRef :: Word16
- bootstrapArguments :: Vector Word16
- data ExceptionTableEntry = ExceptionTableEntry {}
- data MethodInfo = MethodInfo {
- accessFlags :: Word16
- nameIndex :: Word16
- descriptorIndex :: Word16
- attributes :: Vector AttributeInfo
- putConstantPool :: Vector ConstantPoolInfo -> Put
- putInterfaceTable :: Vector Word16 -> Put
- putFieldTable :: Vector FieldInfo -> Put
- putAttributes :: Vector AttributeInfo -> Put
- putAttribute :: Attribute -> Put
- putBootstrapMethod :: BootstrapMethod -> Put
- putExceptionTable :: Vector ExceptionTableEntry -> Put
- putMethodTable :: Vector MethodInfo -> Put
Documentation
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
| |
Constructors
| FieldInfo | |
Fields
| |
data AttributeInfo Source #
Constructors
| AttributeInfo | |
Instances
| Show AttributeInfo Source # | |
Defined in JVM.Data.Raw.ClassFile Methods showsPrec :: Int -> AttributeInfo -> ShowS # show :: AttributeInfo -> String # showList :: [AttributeInfo] -> ShowS # | |
| WriteBinary AttributeInfo Source # | |
Defined in JVM.Data.Raw.ClassFile Methods writeBinary :: AttributeInfo -> Put Source # | |
Constructors
| CodeAttribute | |
Fields
| |
| InnerClassesAttribute (Vector InnerClassInfo) | |
| LineNumberTableAttribute (Vector LineNumberTableEntry) | |
| StackMapTableAttribute (Vector StackMapFrame) | |
| ConstantValueAttribute Word16 | |
| SourceFileAttribute Word16 | |
| BootstrapMethodsAttribute (Vector BootstrapMethod) | |
data InnerClassInfo Source #
Constructors
| InnerClassInfo | |
Fields
| |
Instances
| Show InnerClassInfo Source # | |
Defined in JVM.Data.Raw.ClassFile Methods showsPrec :: Int -> InnerClassInfo -> ShowS # show :: InnerClassInfo -> String # showList :: [InnerClassInfo] -> ShowS # | |
data LineNumberTableEntry Source #
Constructors
| LineNumberTableEntry | |
Fields
| |
Instances
| Show LineNumberTableEntry Source # | |
Defined in JVM.Data.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 JVM.Data.Raw.ClassFile Methods showsPrec :: Int -> StackMapFrame -> ShowS # show :: StackMapFrame -> String # showList :: [StackMapFrame] -> ShowS # | |
data VerificationTypeInfo Source #
Constructors
| TopVariableInfo | |
| IntegerVariableInfo | |
| FloatVariableInfo | |
| LongVariableInfo | |
| DoubleVariableInfo | |
| NullVariableInfo | |
| UninitializedThisVariableInfo | |
| ObjectVariableInfo Word16 | |
| UninitializedVariableInfo U2 |
Instances
| Show VerificationTypeInfo Source # | |
Defined in JVM.Data.Raw.ClassFile Methods showsPrec :: Int -> VerificationTypeInfo -> ShowS # show :: VerificationTypeInfo -> String # showList :: [VerificationTypeInfo] -> ShowS # | |
data BootstrapMethod Source #
Constructors
| BootstrapMethod | |
Fields
| |
Instances
| Show BootstrapMethod Source # | |
Defined in JVM.Data.Raw.ClassFile Methods showsPrec :: Int -> BootstrapMethod -> ShowS # show :: BootstrapMethod -> String # showList :: [BootstrapMethod] -> ShowS # | |
| Eq BootstrapMethod Source # | |
Defined in JVM.Data.Raw.ClassFile Methods (==) :: BootstrapMethod -> BootstrapMethod -> Bool # (/=) :: BootstrapMethod -> BootstrapMethod -> Bool # | |
| Ord BootstrapMethod Source # | |
Defined in JVM.Data.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 # | |
data ExceptionTableEntry Source #
Constructors
| ExceptionTableEntry | |
Instances
| Show ExceptionTableEntry Source # | |
Defined in JVM.Data.Raw.ClassFile Methods showsPrec :: Int -> ExceptionTableEntry -> ShowS # show :: ExceptionTableEntry -> String # showList :: [ExceptionTableEntry] -> ShowS # | |
| WriteBinary ExceptionTableEntry Source # | |
Defined in JVM.Data.Raw.ClassFile Methods writeBinary :: ExceptionTableEntry -> Put Source # | |
data MethodInfo Source #
Constructors
| MethodInfo | |
Fields
| |
Instances
| Show MethodInfo Source # | |
Defined in JVM.Data.Raw.ClassFile Methods showsPrec :: Int -> MethodInfo -> ShowS # show :: MethodInfo -> String # showList :: [MethodInfo] -> ShowS # | |
| WriteBinary MethodInfo Source # | |
Defined in JVM.Data.Raw.ClassFile Methods writeBinary :: MethodInfo -> Put Source # | |
putConstantPool :: Vector ConstantPoolInfo -> Put Source #
putInterfaceTable :: Vector Word16 -> Put Source #
putFieldTable :: Vector FieldInfo -> Put Source #
putAttributes :: Vector AttributeInfo -> Put Source #
putAttribute :: Attribute -> Put Source #
Puts the attribute data. This must not include length or name, just the actual value
putExceptionTable :: Vector ExceptionTableEntry -> Put Source #
putMethodTable :: Vector MethodInfo -> Put Source #