Documentation ¶
Index ¶
- Constants
- type AttributeInfo
- type ClassFile
- func (this *ClassFile) AccessFlag() uint16
- func (this *ClassFile) ClassName() string
- func (this *ClassFile) ConstantPool() ConstantPool
- func (this *ClassFile) Fields() []*MemberInfo
- func (this *ClassFile) InterfaceNames() []string
- func (this *ClassFile) Interfaces() string
- func (this *ClassFile) Magic() string
- func (this *ClassFile) Methods() []*MemberInfo
- func (this *ClassFile) SourceFile() string
- func (this *ClassFile) SuperClassName() string
- func (this *ClassFile) Version() string
- type ClassReader
- type CodeAttribute
- type ConstantClassInfo
- type ConstantDoubleInfo
- type ConstantFieldRefInfo
- type ConstantFloatInfo
- type ConstantInfo
- type ConstantIntegerInfo
- type ConstantInterfaceMethodRefInfo
- type ConstantInvokeDynamicInfo
- type ConstantLongInfo
- type ConstantMemberRefInfo
- type ConstantMethodHandleInfo
- type ConstantMethodRefInfo
- type ConstantMethodTypeInfo
- type ConstantNameAndTypeRefInfo
- type ConstantPool
- type ConstantStringInfo
- type ConstantUtf8Info
- type ConstantValueAttribute
- type DeprecatedAttribute
- type ExceptionAttribute
- type ExceptionTableEntry
- type LineNumberTableAttribute
- type LineNumberTableEntry
- type LocalVariableTableAttribute
- type LocalVariableTableEntry
- type MarkerAttribute
- type MemberInfo
- type SourceFileAttribute
- type SyntheticAttribute
- type UnparsedAttribute
Constants ¶
View Source
const ( AttrCode = "Code" AttrConstantValue = "ConstantValue" AttrDeprecated = "Deprecated" AttrExceptions = "Exceptions" AttrLineNumberTable = "LineNumberTable" AttrLocalVariableTable = "LocalVariableTable" AttrSourceFile = "SourceFile" AttrSynthetic = "Synthetic" )
View Source
const ( CONSTANT_Class = 7 CONSTANT_Fieldref = 9 CONSTANT_Methodref = 10 CONSTANT_InterfaceMethodref = 11 CONSTANT_String = 8 CONSTANT_Integer = 3 CONSTANT_Float = 4 CONSTANT_Long = 5 CONSTANT_Double = 6 CONSTANT_NameAndType = 12 CONSTANT_Utf8 = 1 CONSTANT_MethodHandle = 15 CONSTANT_MethodType = 16 CONSTANT_InvokeDynamic = 18 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeInfo ¶
type AttributeInfo interface {
// contains filtered or unexported methods
}
type ClassFile ¶
type ClassFile struct {
// contains filtered or unexported fields
}
func (*ClassFile) AccessFlag ¶
func (*ClassFile) ConstantPool ¶
func (this *ClassFile) ConstantPool() ConstantPool
func (*ClassFile) Fields ¶
func (this *ClassFile) Fields() []*MemberInfo
func (*ClassFile) InterfaceNames ¶
func (*ClassFile) Interfaces ¶
func (*ClassFile) Methods ¶
func (this *ClassFile) Methods() []*MemberInfo
func (*ClassFile) SourceFile ¶
func (*ClassFile) SuperClassName ¶
type ClassReader ¶
type ClassReader struct {
// contains filtered or unexported fields
}
func NewClassReader ¶
func NewClassReader(data []byte) *ClassReader
type CodeAttribute ¶
type CodeAttribute struct {
// contains filtered or unexported fields
}
变长属性,只存在于 Method_info 里 如果方法是 native/abstract 对应的 MethodInfo 里不应该有该属性 否则,MethodInfo 里有且只能有一个 Code 属性
func (*CodeAttribute) Code ¶
func (this *CodeAttribute) Code() []byte
func (*CodeAttribute) ExceptionTable ¶
func (this *CodeAttribute) ExceptionTable() []*ExceptionTableEntry
func (*CodeAttribute) LineNumberTable ¶
func (this *CodeAttribute) LineNumberTable() []*LineNumberTableEntry
func (*CodeAttribute) MaxLocals ¶
func (this *CodeAttribute) MaxLocals() uint16
func (*CodeAttribute) MaxStack ¶
func (this *CodeAttribute) MaxStack() uint16
type ConstantClassInfo ¶
type ConstantClassInfo struct {
// contains filtered or unexported fields
}
func (*ConstantClassInfo) Name ¶
func (this *ConstantClassInfo) Name() string
func (*ConstantClassInfo) String ¶
func (this *ConstantClassInfo) String() string
func (*ConstantClassInfo) Val ¶
func (this *ConstantClassInfo) Val() interface{}
type ConstantDoubleInfo ¶
type ConstantDoubleInfo struct {
// contains filtered or unexported fields
}
func (*ConstantDoubleInfo) String ¶
func (this *ConstantDoubleInfo) String() string
func (*ConstantDoubleInfo) Val ¶
func (this *ConstantDoubleInfo) Val() interface{}
type ConstantFieldRefInfo ¶
type ConstantFieldRefInfo struct {
ConstantMemberRefInfo
}
func (*ConstantFieldRefInfo) String ¶
func (this *ConstantFieldRefInfo) String() string
func (*ConstantFieldRefInfo) Val ¶
func (this *ConstantFieldRefInfo) Val() interface{}
type ConstantFloatInfo ¶
type ConstantFloatInfo struct {
// contains filtered or unexported fields
}
func (*ConstantFloatInfo) String ¶
func (this *ConstantFloatInfo) String() string
func (*ConstantFloatInfo) Val ¶
func (this *ConstantFloatInfo) Val() interface{}
type ConstantInfo ¶
type ConstantInfo interface { Val() interface{} // contains filtered or unexported methods }
type ConstantIntegerInfo ¶
type ConstantIntegerInfo struct {
// contains filtered or unexported fields
}
func (*ConstantIntegerInfo) String ¶
func (this *ConstantIntegerInfo) String() string
func (*ConstantIntegerInfo) Val ¶
func (this *ConstantIntegerInfo) Val() interface{}
type ConstantInterfaceMethodRefInfo ¶
type ConstantInterfaceMethodRefInfo struct {
ConstantMemberRefInfo
}
func (*ConstantInterfaceMethodRefInfo) String ¶
func (this *ConstantInterfaceMethodRefInfo) String() string
func (*ConstantInterfaceMethodRefInfo) Val ¶
func (this *ConstantInterfaceMethodRefInfo) Val() interface{}
type ConstantInvokeDynamicInfo ¶
type ConstantInvokeDynamicInfo struct {
// contains filtered or unexported fields
}
func (*ConstantInvokeDynamicInfo) Val ¶
func (this *ConstantInvokeDynamicInfo) Val() interface{}
type ConstantLongInfo ¶
type ConstantLongInfo struct {
// contains filtered or unexported fields
}
func (*ConstantLongInfo) String ¶
func (this *ConstantLongInfo) String() string
func (*ConstantLongInfo) Val ¶
func (this *ConstantLongInfo) Val() interface{}
type ConstantMemberRefInfo ¶
type ConstantMemberRefInfo struct {
// contains filtered or unexported fields
}
func (*ConstantMemberRefInfo) ClassName ¶
func (this *ConstantMemberRefInfo) ClassName() string
func (*ConstantMemberRefInfo) NameAndDescriptor ¶
func (this *ConstantMemberRefInfo) NameAndDescriptor() (string, string)
func (*ConstantMemberRefInfo) String ¶
func (this *ConstantMemberRefInfo) String() string
type ConstantMethodHandleInfo ¶
type ConstantMethodHandleInfo struct {
// contains filtered or unexported fields
}
func (*ConstantMethodHandleInfo) Val ¶
func (this *ConstantMethodHandleInfo) Val() interface{}
type ConstantMethodRefInfo ¶
type ConstantMethodRefInfo struct {
ConstantMemberRefInfo
}
func (*ConstantMethodRefInfo) String ¶
func (this *ConstantMethodRefInfo) String() string
func (*ConstantMethodRefInfo) Val ¶
func (this *ConstantMethodRefInfo) Val() interface{}
type ConstantMethodTypeInfo ¶
type ConstantMethodTypeInfo struct {
// contains filtered or unexported fields
}
func (*ConstantMethodTypeInfo) Val ¶
func (this *ConstantMethodTypeInfo) Val() interface{}
type ConstantNameAndTypeRefInfo ¶
type ConstantNameAndTypeRefInfo struct {
// contains filtered or unexported fields
}
func (*ConstantNameAndTypeRefInfo) NameAndType ¶
func (this *ConstantNameAndTypeRefInfo) NameAndType() (string, string)
func (*ConstantNameAndTypeRefInfo) String ¶
func (this *ConstantNameAndTypeRefInfo) String() string
func (*ConstantNameAndTypeRefInfo) Val ¶
func (this *ConstantNameAndTypeRefInfo) Val() interface{}
type ConstantPool ¶
type ConstantPool []ConstantInfo
func (ConstantPool) String ¶
func (this ConstantPool) String() string
type ConstantStringInfo ¶
type ConstantStringInfo struct {
// contains filtered or unexported fields
}
func (*ConstantStringInfo) String ¶
func (this *ConstantStringInfo) String() string
func (*ConstantStringInfo) Val ¶
func (this *ConstantStringInfo) Val() interface{}
type ConstantUtf8Info ¶
type ConstantUtf8Info struct {
// contains filtered or unexported fields
}
func (*ConstantUtf8Info) String ¶
func (this *ConstantUtf8Info) String() string
func (*ConstantUtf8Info) Val ¶
func (this *ConstantUtf8Info) Val() interface{}
type ConstantValueAttribute ¶
type ConstantValueAttribute struct {
// contains filtered or unexported fields
}
定长属性,只会出现在 field_info 结构里
func (*ConstantValueAttribute) ConstantValueIndex ¶
func (this *ConstantValueAttribute) ConstantValueIndex() uint16
type DeprecatedAttribute ¶
type DeprecatedAttribute struct {
MarkerAttribute
}
type ExceptionAttribute ¶
type ExceptionAttribute struct {
// contains filtered or unexported fields
}
type ExceptionTableEntry ¶
type ExceptionTableEntry struct {
// contains filtered or unexported fields
}
func (*ExceptionTableEntry) CatchType ¶
func (this *ExceptionTableEntry) CatchType() uint16
func (*ExceptionTableEntry) EndPc ¶
func (this *ExceptionTableEntry) EndPc() uint16
func (*ExceptionTableEntry) HandlerPc ¶
func (this *ExceptionTableEntry) HandlerPc() uint16
func (*ExceptionTableEntry) StartPc ¶
func (this *ExceptionTableEntry) StartPc() uint16
type LineNumberTableAttribute ¶
type LineNumberTableAttribute struct {
// contains filtered or unexported fields
}
type LineNumberTableEntry ¶
type LineNumberTableEntry struct {
// contains filtered or unexported fields
}
func (*LineNumberTableEntry) GetLineNumber ¶
func (this *LineNumberTableEntry) GetLineNumber() uint16
func (*LineNumberTableEntry) GetStartPc ¶
func (this *LineNumberTableEntry) GetStartPc() uint16
type LocalVariableTableAttribute ¶
type LocalVariableTableAttribute struct {
// contains filtered or unexported fields
}
type LocalVariableTableEntry ¶
type LocalVariableTableEntry struct {
// contains filtered or unexported fields
}
type MemberInfo ¶
type MemberInfo struct {
// contains filtered or unexported fields
}
func (*MemberInfo) AccessFlags ¶
func (this *MemberInfo) AccessFlags() uint16
func (*MemberInfo) CodeAttr ¶
func (this *MemberInfo) CodeAttr() *CodeAttribute
func (*MemberInfo) ConstValueAttr ¶
func (this *MemberInfo) ConstValueAttr() *ConstantValueAttribute
func (*MemberInfo) Descriptor ¶
func (this *MemberInfo) Descriptor() string
func (*MemberInfo) Name ¶
func (this *MemberInfo) Name() string
type SourceFileAttribute ¶
type SourceFileAttribute struct {
// contains filtered or unexported fields
}
type SyntheticAttribute ¶
type SyntheticAttribute struct {
MarkerAttribute
}
type UnparsedAttribute ¶
type UnparsedAttribute struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.