3.1.2. Constant Pool#
- class umbrella.java.constant_pool.ConstantInfoKind(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
- UTF8 = 1#
- INTEGER = 3#
- FLOAT = 4#
- LONG = 5#
- DOUBLE = 6#
- CLASS = 7#
- STRING = 8#
- FIELD_REF = 9#
- METHOD_REF = 10#
- INTERFACE_METHOD_REF = 11#
- NAME_AND_TYPE = 12#
- METHOD_HANDLE = 15#
- METHOD_TYPE = 16#
- DYNAMIC = 17#
- INVOKE_DYNAMIC = 18#
- MODULE = 19#
- PACKAGE = 20#
- class umbrella.java.constant_pool.ConstantUTF8(length: 'uint16_t', value: 'str')[source]#
- length: int#
- value: str#
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantInteger(value: 'uint32_t')[source]#
- value: int#
The bytes of the value are stored in big-endian (high byte first) order.
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantFloat(value: 'float')[source]#
- value: float#
The bytes of the single format representation are stored in big-endian (high byte first) order.
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantDouble(value: 'float')[source]#
- value: float#
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantLong(value: 'uint64_t')[source]#
- value: int#
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantRef(value: 'uint16_t')[source]#
- value: int#
The value of the name_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info structure representing a valid string encoded in internal form.
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantNameAndType(name_index: 'uint16_t', type_index: 'uint16_t')[source]#
- name_index: int#
The name_index item’s value must be a valid index within the constant_pool table. The entry in the constant_pool at that index must be a ConstantUTF8 structure, representing either the special method name <init> or a valid unqualified name (§4.2.2) that identifies a field or method.
- type_index: int#
The type_index item’s value must be a valid index within the constant_pool table. The entry in the constant_pool at that index must be a ConstantUTF8 structure, representing a valid field descriptor or method descriptor.
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantNameAndTypeRef(class_index: 'uint16_t', name_and_type_index: 'uint16_t')[source]#
- class_index: int#
The class_index item’s value must be a valid index within the constant_pool table. The entry in the constant_pool at that index must be a ConstantClass structure representing a class or interface type that includes the field or method as a member.
- name_and_type_index: int#
The name_and_type_index item’s value must be a valid index within the constant_pool table. The entry in the constant_pool at that index must be a ConstantNameAndType structure. This entry in the constant_pool specifies the name and descriptor of the field or method.
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantMethodHandle(reference_kind: 'uint8_t', reference_index: 'uint16_t')[source]#
- reference_kind: int#
The reference_kind item’s value must be within the range of 1 to 9. This value signifies the type of this method handle, describing its bytecode behavior.
- reference_index: int#
The value of the reference_index item must be a valid index into the constant_pool table.
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantInvokeDynamic(bootstrap_method_attr_index: 'uint16_t', reference_index: 'uint16_t')[source]#
- bootstrap_method_attr_index: int#
The bootstrap_method_attr_index item’s value must be a valid index within the bootstrap_methods array of the bootstrap method table in this class file.
- reference_index: int#
The name_and_type_index item’s value must be a valid index within the constant_pool table. The entry in the constant_pool at that index must be a ConstantNameAndType structure representing a method name and method descriptor.
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantInfo(tag_value: 'uint8_t', data: 't.Any')[source]#
- tag_value: int#
Each item in the constant_pool table must begin with a 1-byte tag indicating the kind of the entry.
- tag: ConstantInfoKind = False#
the parsed kind
- data: Any#
based on the specified tag one of the structures defined above
- parser = <DataclassStruct <Struct>>#
- struct = <Struct>#
- class umbrella.java.constant_pool.ConstantPool(count: 'uint16_t', pool: 't.List[ConstantInfo]')[source]#
- count: int#
The value of the constant_pool_count item is equal to the number of entries in the constant_pool table plus one. A constant_pool index is considered valid if it is greater than zero and less than ‘count’.
- pool: List[ConstantInfo]#
The constant_pool is a table of structures representing various string constants, class and interface names, field names, and other constants that are referred to within the ClassFile structure and its substructures. The format of each constant_pool table entry is indicated by its first “tag” byte.
- index(kind: ConstantInfoKind) int [source]#