Documentation ¶
Index ¶
- type AttributeInfo
- type ClassFile
- func (classFile *ClassFile) GetAccessFlags() uint16
- func (classFile *ClassFile) GetClassName() string
- func (classFile *ClassFile) GetConstantPool() ConstantPool
- func (classFile *ClassFile) GetFields() []*MemberInfo
- func (classFile *ClassFile) GetInterfaceNames() []string
- func (classFile *ClassFile) GetMajorVersion() uint16
- func (classFile *ClassFile) GetMethods() []*MemberInfo
- func (classFile *ClassFile) GetMinorVersion() uint16
- func (classFile *ClassFile) GetSourceFileAttribute() *SourceFileAttribute
- func (classFile *ClassFile) GetSuperClassName() string
- func (classFile *ClassFile) Read(classReader *ClassReader)
- func (classFile *ClassFile) ReadAndCheckMagicNumber(classReader *ClassReader)
- func (classFile *ClassFile) ReadAndCheckVersion(classReader *ClassReader)
- type ClassReader
- func (classReader *ClassReader) ReadBytes(numberOfBytes uint32) []byte
- func (classReader *ClassReader) ReadUint16() uint16
- func (classReader *ClassReader) ReadUint16Table() []uint16
- func (classReader *ClassReader) ReadUint32() uint32
- func (classReader *ClassReader) ReadUint64() uint64
- func (classReader *ClassReader) ReadUint8() uint8
- type CodeAttribute
- func (codeAttribute *CodeAttribute) GetCode() []byte
- func (codeAttribute *CodeAttribute) GetExceptionTable() []*ExceptionTableEntry
- func (codeAttribute *CodeAttribute) GetLineNumberTableAttribute() *LineNumberTableAttribute
- func (codeAttribute *CodeAttribute) GetMaxNumberOfLocalVariables() uint
- func (codeAttribute *CodeAttribute) GetMaxStackSize() uint
- func (codeAttribute *CodeAttribute) Read(classReader *ClassReader)
- type ConstantClassInfo
- type ConstantDoubleInfo
- type ConstantFieldReferenceInfo
- type ConstantFloatInfo
- type ConstantInfo
- type ConstantIntegerInfo
- type ConstantInterfaceMethodReferenceInfo
- type ConstantInvokeDynamicInfo
- type ConstantLongInfo
- type ConstantMemberReferenceInfo
- type ConstantMethodHandleInfo
- type ConstantMethodReferenceInfo
- type ConstantMethodTypeInfo
- type ConstantNameAndTypeDescriptorInfo
- type ConstantPool
- type ConstantStringReferenceInfo
- type ConstantUtf8StringInfo
- type ConstantValueAttribute
- type DeprecatedAttribute
- type ExceptionTableEntry
- type ExceptionsAttribute
- type LineNumberTableAttribute
- type LineNumberTableEntry
- type LocalVariableTableAttribute
- type LocalVariableTableEntry
- type MarkerAttribute
- type MemberInfo
- type SourceFileAttribute
- type SyntheticAttribute
- type UnparsedAttribute
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeInfo ¶
type AttributeInfo interface {
Read(classReader *ClassReader)
}
attribute_info { u2 attribute_name_index; u4 attribute_length; u1 info[attribute_length]; }
type ClassFile ¶
type ClassFile struct {
// contains filtered or unexported fields
}
ClassFile { u4 magic; u2 minor_version; u2 major_version; u2 constant_pool_count; cp_info constant_pool[constant_pool_count-1]; u2 access_flags; u2 this_class; u2 super_class; u2 interfaces_count; u2 interfaces[interfaces_count]; u2 fields_count; field_info fields[fields_count]; u2 methods_count; method_info methods[methods_count]; u2 attributes_count; attribute_info attributes[attributes_count]; }
func (*ClassFile) GetAccessFlags ¶
func (*ClassFile) GetClassName ¶
func (*ClassFile) GetConstantPool ¶
func (classFile *ClassFile) GetConstantPool() ConstantPool
func (*ClassFile) GetFields ¶
func (classFile *ClassFile) GetFields() []*MemberInfo
func (*ClassFile) GetInterfaceNames ¶
func (*ClassFile) GetMajorVersion ¶
func (*ClassFile) GetMethods ¶
func (classFile *ClassFile) GetMethods() []*MemberInfo
func (*ClassFile) GetMinorVersion ¶
func (*ClassFile) GetSourceFileAttribute ¶
func (classFile *ClassFile) GetSourceFileAttribute() *SourceFileAttribute
func (*ClassFile) GetSuperClassName ¶
func (*ClassFile) Read ¶
func (classFile *ClassFile) Read(classReader *ClassReader)
func (*ClassFile) ReadAndCheckMagicNumber ¶
func (classFile *ClassFile) ReadAndCheckMagicNumber(classReader *ClassReader)
func (*ClassFile) ReadAndCheckVersion ¶
func (classFile *ClassFile) ReadAndCheckVersion(classReader *ClassReader)
type ClassReader ¶
type ClassReader struct {
// contains filtered or unexported fields
}
func (*ClassReader) ReadBytes ¶
func (classReader *ClassReader) ReadBytes(numberOfBytes uint32) []byte
func (*ClassReader) ReadUint16Table ¶
func (classReader *ClassReader) ReadUint16Table() []uint16
func (*ClassReader) ReadUint64 ¶
func (classReader *ClassReader) ReadUint64() uint64
type CodeAttribute ¶
type CodeAttribute struct {
// contains filtered or unexported fields
}
Code_attribute { u2 attribute_name_index; u4 attribute_length; u2 max_stack; u2 max_locals; u4 code_length; u1 code[code_length]; u2 exception_table_length; { u2 start_pc; u2 end_pc; u2 handler_pc; u2 catch_type; } exception_table[exception_table_length]; u2 attributes_count; attribute_info attributes[attributes_count]; }
func (*CodeAttribute) GetCode ¶
func (codeAttribute *CodeAttribute) GetCode() []byte
func (*CodeAttribute) GetExceptionTable ¶
func (codeAttribute *CodeAttribute) GetExceptionTable() []*ExceptionTableEntry
func (*CodeAttribute) GetLineNumberTableAttribute ¶
func (codeAttribute *CodeAttribute) GetLineNumberTableAttribute() *LineNumberTableAttribute
func (*CodeAttribute) GetMaxNumberOfLocalVariables ¶
func (codeAttribute *CodeAttribute) GetMaxNumberOfLocalVariables() uint
func (*CodeAttribute) GetMaxStackSize ¶
func (codeAttribute *CodeAttribute) GetMaxStackSize() uint
func (*CodeAttribute) Read ¶
func (codeAttribute *CodeAttribute) Read(classReader *ClassReader)
type ConstantClassInfo ¶
type ConstantClassInfo struct {
// contains filtered or unexported fields
}
CONSTANT_Class_info { u1 tag; u2 name_index; }
func (*ConstantClassInfo) GetName ¶
func (constantClassInfo *ConstantClassInfo) GetName() string
func (*ConstantClassInfo) Read ¶
func (constantClassInfo *ConstantClassInfo) Read(classReader *ClassReader)
type ConstantDoubleInfo ¶
type ConstantDoubleInfo struct {
// contains filtered or unexported fields
}
CONSTANT_Double_info { u1 tag; u4 high_bytes; u4 low_bytes; }
func (*ConstantDoubleInfo) GetValue ¶
func (constantDoubleInfo *ConstantDoubleInfo) GetValue() float64
func (*ConstantDoubleInfo) Read ¶
func (constantDoubleInfo *ConstantDoubleInfo) Read(classReader *ClassReader)
type ConstantFieldReferenceInfo ¶
type ConstantFieldReferenceInfo struct {
ConstantMemberReferenceInfo
}
CONSTANT_Fieldref_info { u1 tag; u2 class_index; u2 name_and_type_index; }
type ConstantFloatInfo ¶
type ConstantFloatInfo struct {
// contains filtered or unexported fields
}
CONSTANT_Float_info { u1 tag; u4 bytes; }
func (*ConstantFloatInfo) GetValue ¶
func (constantFloatInfo *ConstantFloatInfo) GetValue() float32
func (*ConstantFloatInfo) Read ¶
func (constantFloatInfo *ConstantFloatInfo) Read(classReader *ClassReader)
type ConstantInfo ¶
type ConstantInfo interface {
Read(classReader *ClassReader)
}
type ConstantIntegerInfo ¶
type ConstantIntegerInfo struct {
// contains filtered or unexported fields
}
CONSTANT_Integer_info { u1 tag; u4 bytes; }
func (*ConstantIntegerInfo) GetValue ¶
func (constantIntegerInfo *ConstantIntegerInfo) GetValue() int32
func (*ConstantIntegerInfo) Read ¶
func (constantIntegerInfo *ConstantIntegerInfo) Read(classReader *ClassReader)
type ConstantInterfaceMethodReferenceInfo ¶
type ConstantInterfaceMethodReferenceInfo struct {
ConstantMemberReferenceInfo
}
CONSTANT_InterfaceMethodref_info { u1 tag; u2 class_index; u2 name_and_type_index; }
type ConstantInvokeDynamicInfo ¶
type ConstantInvokeDynamicInfo struct {
// contains filtered or unexported fields
}
CONSTANT_InvokeDynamic_info { u1 tag; u2 bootstrap_method_attr_index; u2 name_and_type_index; }
func (*ConstantInvokeDynamicInfo) Read ¶
func (constantInvokeDynamicInfo *ConstantInvokeDynamicInfo) Read(classReader *ClassReader)
type ConstantLongInfo ¶
type ConstantLongInfo struct {
// contains filtered or unexported fields
}
CONSTANT_Long_info { u1 tag; u4 high_bytes; u4 low_bytes; }
func (*ConstantLongInfo) GetValue ¶
func (constantLongInfo *ConstantLongInfo) GetValue() int64
func (*ConstantLongInfo) Read ¶
func (constantLongInfo *ConstantLongInfo) Read(classReader *ClassReader)
type ConstantMemberReferenceInfo ¶
type ConstantMemberReferenceInfo struct {
// contains filtered or unexported fields
}
func (*ConstantMemberReferenceInfo) GetClassName ¶
func (constantMemberReferenceInfo *ConstantMemberReferenceInfo) GetClassName() string
func (*ConstantMemberReferenceInfo) GetNameAndTypeDescriptor ¶
func (constantMemberReferenceInfo *ConstantMemberReferenceInfo) GetNameAndTypeDescriptor() (string, string)
func (*ConstantMemberReferenceInfo) Read ¶
func (constantMemberReferenceInfo *ConstantMemberReferenceInfo) Read(classReader *ClassReader)
type ConstantMethodHandleInfo ¶
type ConstantMethodHandleInfo struct {
// contains filtered or unexported fields
}
CONSTANT_MethodHandle_info { u1 tag; u1 reference_kind; u2 reference_index; }
func (*ConstantMethodHandleInfo) Read ¶
func (constantMethodHandleInfo *ConstantMethodHandleInfo) Read(classReader *ClassReader)
type ConstantMethodReferenceInfo ¶
type ConstantMethodReferenceInfo struct {
ConstantMemberReferenceInfo
}
CONSTANT_Methodref_info { u1 tag; u2 class_index; u2 name_and_type_index; }
type ConstantMethodTypeInfo ¶
type ConstantMethodTypeInfo struct {
// contains filtered or unexported fields
}
CONSTANT_MethodType_info { u1 tag; u2 descriptor_index; }
func (*ConstantMethodTypeInfo) Read ¶
func (constantMethodTypeInfo *ConstantMethodTypeInfo) Read(classReader *ClassReader)
type ConstantNameAndTypeDescriptorInfo ¶
type ConstantNameAndTypeDescriptorInfo struct {
// contains filtered or unexported fields
}
CONSTANT_NameAndType_info { u1 tag; u2 name_index; u2 descriptor_index; }
func (*ConstantNameAndTypeDescriptorInfo) Read ¶
func (constantNameAndTypeDescriptorInfo *ConstantNameAndTypeDescriptorInfo) Read(classReader *ClassReader)
type ConstantPool ¶
type ConstantPool []ConstantInfo
func (ConstantPool) GetClassName ¶
func (constantPool ConstantPool) GetClassName(index uint16) string
func (ConstantPool) GetConstantInfo ¶
func (constantPool ConstantPool) GetConstantInfo(index uint16) ConstantInfo
func (ConstantPool) GetNameAndTypeDescriptor ¶
func (constantPool ConstantPool) GetNameAndTypeDescriptor(index uint16) (string, string)
func (ConstantPool) GetUtf8String ¶
func (constantPool ConstantPool) GetUtf8String(index uint16) string
type ConstantStringReferenceInfo ¶
type ConstantStringReferenceInfo struct {
// contains filtered or unexported fields
}
CONSTANT_String_info { u1 tag; u2 string_index; }
func (*ConstantStringReferenceInfo) GetString ¶
func (constantStringReferenceInfo *ConstantStringReferenceInfo) GetString() string
func (*ConstantStringReferenceInfo) Read ¶
func (constantStringReferenceInfo *ConstantStringReferenceInfo) Read(classReader *ClassReader)
type ConstantUtf8StringInfo ¶
type ConstantUtf8StringInfo struct {
// contains filtered or unexported fields
}
CONSTANT_Utf8_info { u1 tag; u2 length; u1 bytes[length]; }
func (*ConstantUtf8StringInfo) Read ¶
func (constantUtf8StringInfo *ConstantUtf8StringInfo) Read(classReader *ClassReader)
type ConstantValueAttribute ¶
type ConstantValueAttribute struct {
// contains filtered or unexported fields
}
ConstantValue_attribute { u2 attribute_name_index; u4 attribute_length; u2 constantvalue_index; }
func (*ConstantValueAttribute) GetConstantValueIndex ¶
func (constantValueAttribute *ConstantValueAttribute) GetConstantValueIndex() uint16
func (*ConstantValueAttribute) Read ¶
func (constantValueAttribute *ConstantValueAttribute) Read(classReader *ClassReader)
type DeprecatedAttribute ¶
type DeprecatedAttribute struct {
MarkerAttribute
}
Deprecated_attribute { u2 attribute_name_index; u4 attribute_length; }
type ExceptionTableEntry ¶
type ExceptionTableEntry struct {
// contains filtered or unexported fields
}
func (*ExceptionTableEntry) GetCatchTypeIndex ¶
func (exceptionTableEntry *ExceptionTableEntry) GetCatchTypeIndex() uint16
func (*ExceptionTableEntry) GetEndPC ¶
func (exceptionTableEntry *ExceptionTableEntry) GetEndPC() uint16
func (*ExceptionTableEntry) GetHandlerPC ¶
func (exceptionTableEntry *ExceptionTableEntry) GetHandlerPC() uint16
func (*ExceptionTableEntry) GetStartPC ¶
func (exceptionTableEntry *ExceptionTableEntry) GetStartPC() uint16
type ExceptionsAttribute ¶
type ExceptionsAttribute struct {
// contains filtered or unexported fields
}
Exceptions_attribute { u2 attribute_name_index; u4 attribute_length; u2 number_of_exceptions; u2 exception_index_table[number_of_exceptions]; }
func (*ExceptionsAttribute) GetExceptionIndexTable ¶
func (exceptionsAttribute *ExceptionsAttribute) GetExceptionIndexTable() []uint16
func (*ExceptionsAttribute) Read ¶
func (exceptionsAttribute *ExceptionsAttribute) Read(classReader *ClassReader)
type LineNumberTableAttribute ¶
type LineNumberTableAttribute struct {
// contains filtered or unexported fields
}
LineNumberTable_attribute { u2 attribute_name_index; u4 attribute_length; u2 line_number_table_length; { u2 start_pc; u2 line_number; } line_number_table[line_number_table_length]; }
func (*LineNumberTableAttribute) GetLineNumber ¶
func (lineNumberTableAttribute *LineNumberTableAttribute) GetLineNumber(pc int) int
func (*LineNumberTableAttribute) Read ¶
func (lineNumberTableAttribute *LineNumberTableAttribute) Read(classReader *ClassReader)
type LineNumberTableEntry ¶
type LineNumberTableEntry struct {
// contains filtered or unexported fields
}
type LocalVariableTableAttribute ¶
type LocalVariableTableAttribute struct {
// contains filtered or unexported fields
}
LocalVariableTable_attribute { u2 attribute_name_index; u4 attribute_length; u2 local_variable_table_length; { u2 start_pc; u2 length; u2 name_index; u2 descriptor_index; u2 index; } local_variable_table[local_variable_table_length]; }
func (*LocalVariableTableAttribute) Read ¶
func (localVariableTableAttribute *LocalVariableTableAttribute) Read(classReader *ClassReader)
type LocalVariableTableEntry ¶
type LocalVariableTableEntry struct {
// contains filtered or unexported fields
}
type MarkerAttribute ¶
type MarkerAttribute struct { }
func (*MarkerAttribute) Read ¶
func (markerAttribute *MarkerAttribute) Read(classReader *ClassReader)
type MemberInfo ¶
type MemberInfo struct {
// contains filtered or unexported fields
}
field_info { u2 access_flags; u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; }
method_info { u2 access_flags; u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; }
func (*MemberInfo) GetAccessFlags ¶
func (memberInfo *MemberInfo) GetAccessFlags() uint16
func (*MemberInfo) GetCodeAttribute ¶
func (memberInfo *MemberInfo) GetCodeAttribute() *CodeAttribute
func (*MemberInfo) GetConstantValueAttribute ¶
func (memberInfo *MemberInfo) GetConstantValueAttribute() *ConstantValueAttribute
func (*MemberInfo) GetDescriptor ¶
func (memberInfo *MemberInfo) GetDescriptor() string
func (*MemberInfo) GetName ¶
func (memberInfo *MemberInfo) GetName() string
type SourceFileAttribute ¶
type SourceFileAttribute struct {
// contains filtered or unexported fields
}
SourceFile_attribute { u2 attribute_name_index; u4 attribute_length; u2 sourcefile_index; }
func (*SourceFileAttribute) GetFileName ¶
func (sourceFileAttribute *SourceFileAttribute) GetFileName() string
func (*SourceFileAttribute) Read ¶
func (sourceFileAttribute *SourceFileAttribute) Read(classReader *ClassReader)
type SyntheticAttribute ¶
type SyntheticAttribute struct {
MarkerAttribute
}
Synthetic_attribute { u2 attribute_name_index; u4 attribute_length; }
type UnparsedAttribute ¶
type UnparsedAttribute struct {
// contains filtered or unexported fields
}
func (*UnparsedAttribute) GetData ¶
func (unparsedAttribute *UnparsedAttribute) GetData() []byte
func (*UnparsedAttribute) Read ¶
func (unparsedAttribute *UnparsedAttribute) Read(classReader *ClassReader)
Source Files ¶
- attribute_info.go
- class_file.go
- class_reader.go
- code_attribute.go
- constant_class_info.go
- constant_double_info.go
- constant_field_reference_info.go
- constant_float_info.go
- constant_info.go
- constant_integer_info.go
- constant_interface_method_reference_info.go
- constant_invoke_dynamic_info.go
- constant_long_info.go
- constant_member_reference_info.go
- constant_method_handle_info.go
- constant_method_reference_info.go
- constant_method_type_info.go
- constant_name_and_type_descriptor_info.go
- constant_pool.go
- constant_string_reference_info.go
- constant_utf8_string_info.go
- constant_value_attribute.go
- deprecated_attribute.go
- exception_table_entry.go
- exceptions_attribute.go
- line_number_table_attribute.go
- local_variable_table_attribute.go
- marker_attribute.go
- member_info.go
- source_file_attribute.go
- synthetic_attribute.go
- unparsed_attribute.go
Click to show internal directories.
Click to hide internal directories.