Documentation ¶
Index ¶
- Constants
- type Class
- func (self *Class) ConstantPool() *ConstantPool
- func (self *Class) GetMainMethod() *Method
- func (self Class) IsAbstract() bool
- func (self *Class) IsInterface() bool
- func (self *Class) IsPrivate() bool
- func (self *Class) IsProtected() bool
- func (self *Class) IsPublic() bool
- func (self *Class) NewObject() *Object
- func (self Class) StaticVars() Slots
- type ClassLoader
- type ClassMember
- type ClassRef
- type Constant
- type ConstantPool
- type Field
- type FieldRef
- type InterfaceMethodRef
- type MemberRef
- type Method
- type MethodRef
- type Object
- type Slot
- type Slots
- func (self Slots) GetDouble(index uint) float64
- func (self Slots) GetFloat(index uint) float32
- func (self Slots) GetInt(index uint) int32
- func (self Slots) GetLong(index uint) int64
- func (self Slots) GetRef(index uint) *Object
- func (self Slots) SetDouble(index uint, val float64)
- func (self Slots) SetFloat(index uint, val float32)
- func (self Slots) SetInt(index uint, val int32)
- func (self Slots) SetLong(index uint, val int64)
- func (self Slots) SetRef(index uint, ref *Object)
- type SymRef
Constants ¶
View Source
const ( // public ACC_PUBLIC = 0x0001 // private ACC_PRIVATE = 0x0002 // protected ACC_PROTECTED = 0x0004 // static ACC_STATIC = 0x0008 // final ACC_FINAL = 0x0010 // synchronized ACC_SYNCHRONIZED = 0x0020 // volatile ACC_VOLATILE = 0x0020 // super ACC_SUPER = 0x0020 // bridge ACC_BRIDGE = 0x0040 // transient ACC_TRANSIENT = 0x0040 // varargs ACC_VARARGS = 0x0080 // native ACC_NATIVE = 0x0100 // interface ACC_INTERFACE = 0x0200 // abstract ACC_ABSTRACT = 0x0400 // strict ACC_STRICT = 0x0800 // synthetic ACC_SYNTHETIC = 0x1000 // annotation ACC_ANNOTATION = 0x2000 // enum ACC_ENUM = 0x4000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Class ¶
type Class struct {
// contains filtered or unexported fields
}
func (*Class) ConstantPool ¶
func (self *Class) ConstantPool() *ConstantPool
func (*Class) GetMainMethod ¶
func (Class) IsAbstract ¶
func (*Class) IsInterface ¶
func (*Class) IsProtected ¶
func (Class) StaticVars ¶
type ClassLoader ¶
type ClassLoader struct {
// contains filtered or unexported fields
}
类加载器 类加载器依赖ClassPath来搜寻和读取class文件
func (*ClassLoader) LoadClass ¶
func (self *ClassLoader) LoadClass(name string) *Class
在classMap中根据name查询类 然后将将类数据加载到方法区中
type ClassMember ¶
type ClassMember struct {
// contains filtered or unexported fields
}
func (*ClassMember) IsPrivate ¶
func (self *ClassMember) IsPrivate() bool
func (*ClassMember) IsProtected ¶
func (self *ClassMember) IsProtected() bool
func (*ClassMember) IsPublic ¶
func (self *ClassMember) IsPublic() bool
type ConstantPool ¶
type ConstantPool struct {
// contains filtered or unexported fields
}
运行时常量池
func (*ConstantPool) GetConstant ¶
func (self *ConstantPool) GetConstant(index uint) Constant
根据索引返回常量
func (*ConstantPool) Name ¶
func (self *ConstantPool) Name() string
type Field ¶
type Field struct { ClassMember // contains filtered or unexported fields }
实例字段
func (Field) ConstValueIndex ¶
func (Field) Descriptor ¶
func (Field) IsLongOrDouble ¶
判断描述符是否属于J或者D,J -> long,D -> double 基本类型中,除了long的定义奇特外,其他都是基于首字母
type InterfaceMethodRef ¶
type InterfaceMethodRef struct { MemberRef // contains filtered or unexported fields }
接口方法的符号引用
type Method ¶
type Method struct { ClassMember // contains filtered or unexported fields }
type MethodRef ¶
type MethodRef struct { MemberRef // contains filtered or unexported fields }
func (MethodRef) Descriptor ¶
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func (*Object) IsInstanceOf ¶
Click to show internal directories.
Click to hide internal directories.