Documentation ¶
Index ¶
- Constants
- func GoString(jStr *NormalObject) string
- func UTF16ToString(s []uint16) string
- type ArrayObject
- type BaseObject
- type ClassLoader
- type ClassMember
- type ClassMemberSymRef
- type ClassObject
- func (this *ClassObject) ArrayClass() *ClassObject
- func (this *ClassObject) ClassLoader() *ClassLoader
- func (this *ClassObject) ConstantPool() *ConstantPool
- func (this *ClassObject) ElementClass() *ClassObject
- func (this *ClassObject) GetClinitMethod() *Method
- func (this *ClassObject) GetField(obj *NormalObject, name string, descriptor string) interface{}
- func (this *ClassObject) GetMainMethod() *Method
- func (this *ClassObject) GetMethod(name string, descriptor string) *Method
- func (this *ClassObject) InitStarted() bool
- func (this *ClassObject) IsAbstract() bool
- func (this *ClassObject) IsArray() bool
- func (this *ClassObject) IsClassClass() bool
- func (this *ClassObject) IsImplClassOf(interfaceClass *ClassObject) bool
- func (this *ClassObject) IsInterface() bool
- func (this *ClassObject) IsPrimitive() bool
- func (this *ClassObject) IsPublic() bool
- func (this *ClassObject) IsSubClassOf(class *ClassObject) bool
- func (this *ClassObject) IsSubInterfaceOf(target *ClassObject) bool
- func (this *ClassObject) IsSuper() bool
- func (this *ClassObject) JavaName() string
- func (this *ClassObject) Name() string
- func (this *ClassObject) NewArray(count int32) *ArrayObject
- func (this *ClassObject) NewObject() Object
- func (this *ClassObject) PackageName() string
- func (this *ClassObject) SetField(obj *NormalObject, name string, descriptor string, value interface{})
- func (this *ClassObject) SourceFile() string
- func (this *ClassObject) StartInit()
- func (this *ClassObject) StaticSlots() Slots
- func (this *ClassObject) SuperClass() *ClassObject
- type ClassSymRef
- type Constant
- type ConstantPool
- type ExceptionHandler
- type ExceptionTable
- type Field
- type FieldSymRef
- type IMethodSymRef
- type InterfaceMethodSymRef
- type MarkWord
- type Method
- func (this *Method) ArgSlotCount() uint
- func (this *Method) Class() *ClassObject
- func (this *Method) Code() []byte
- func (this *Method) GetLineNumber(pc int) int
- func (this *Method) InjectNativeCodeAttr(returnType string)
- func (this *Method) IsAbstract() bool
- func (this *Method) IsCLInit() bool
- func (this *Method) IsInit() bool
- func (this *Method) IsNative() bool
- func (this *Method) IsStatic() bool
- func (this *Method) LookupExceptionTable(class *ClassObject, pc uint16) *ExceptionHandler
- func (this *Method) MaxLocals() uint
- func (this *Method) MaxStack() uint
- type MethodDescriptor
- type MethodDescriptorParser
- type MethodSymRef
- type NormalObject
- type Object
- type Slot
- type Slots
- func (this Slots) GetDouble(index uint) float64
- func (this Slots) GetFloat(index uint) float32
- func (this Slots) GetInt(index uint) int32
- func (this Slots) GetLong(index uint) int64
- func (this Slots) GetRef(index uint) Object
- func (this Slots) SetDouble(index uint, val float64)
- func (this Slots) SetFloat(index uint, val float32)
- func (this Slots) SetInt(index uint, val int32)
- func (this Slots) SetLong(index uint, val int64)
- func (this Slots) SetRef(index uint, ref Object)
- type SymbolicRef
- type TypeDescriptor
Constants ¶
View Source
const ( ACC_PUBLIC = 0x0001 // class field method ACC_PRIVATE = 0x0002 // field method ACC_PROTECTED = 0x0004 // field method ACC_STATIC = 0x0008 // field method ACC_FINAL = 0x0010 // class field method ACC_SUPER = 0x0020 // class ACC_SYNCHRONIZED = 0x0020 // method ACC_VOLATILE = 0x0040 // field ACC_BRIDGE = 0x0040 // method 桥接方法、泛型使用 ACC_TRANSIENT = 0x0080 // field ACC_VARARGS = 0x0080 // method ACC_NATIVE = 0x0100 // method ACC_INTERFACE = 0x0200 // class ACC_ABSTRACT = 0x0400 // class ACC_STRICT = 0x0800 // method ACC_SYNTHETIC = 0x1000 // class field method ACC_ANNOTATION = 0x2000 // class ACC_ENUM = 0x4000 // class field )
Variables ¶
This section is empty.
Functions ¶
func GoString ¶
func GoString(jStr *NormalObject) string
func UTF16ToString ¶
Types ¶
type ArrayObject ¶
type ArrayObject struct { BaseObject // contains filtered or unexported fields }
func (*ArrayObject) ArrayLength ¶
func (this *ArrayObject) ArrayLength() int32
func (*ArrayObject) CopyTo ¶
func (this *ArrayObject) CopyTo(dest *ArrayObject, srcPos int32, destPos int32, length int32)
func (*ArrayObject) Get ¶
func (this *ArrayObject) Get(index int32) interface{}
func (*ArrayObject) Set ¶
func (this *ArrayObject) Set(index int32, value interface{})
type BaseObject ¶
type BaseObject struct { MarkWord // contains filtered or unexported fields }
func (*BaseObject) Class ¶
func (this *BaseObject) Class() *ClassObject
func (*BaseObject) HashCode ¶
func (this *BaseObject) HashCode() int32
func (*BaseObject) IsInstanceOf ¶
func (this *BaseObject) IsInstanceOf(targetClass *ClassObject) bool
type ClassLoader ¶
type ClassLoader struct {
// contains filtered or unexported fields
}
func NewClassLoader ¶
func NewClassLoader(cp *classpath.Classpath) *ClassLoader
func (*ClassLoader) LoadClass ¶
func (this *ClassLoader) LoadClass(classname string) *ClassObject
func (*ClassLoader) LoadPrimitiveArrayClass ¶
func (this *ClassLoader) LoadPrimitiveArrayClass(aType uint8) *ClassObject
type ClassMember ¶
type ClassMember struct {
// contains filtered or unexported fields
}
func (*ClassMember) Class ¶
func (this *ClassMember) Class() *ClassObject
func (*ClassMember) Descriptor ¶
func (this *ClassMember) Descriptor() string
func (*ClassMember) IsPrivate ¶
func (this *ClassMember) IsPrivate() bool
func (*ClassMember) IsProtected ¶
func (this *ClassMember) IsProtected() bool
func (*ClassMember) IsPublic ¶
func (this *ClassMember) IsPublic() bool
func (*ClassMember) Name ¶
func (this *ClassMember) Name() string
type ClassMemberSymRef ¶
type ClassMemberSymRef struct { SymbolicRef // contains filtered or unexported fields }
func (*ClassMemberSymRef) Descriptor ¶
func (this *ClassMemberSymRef) Descriptor() string
func (*ClassMemberSymRef) Name ¶
func (this *ClassMemberSymRef) Name() string
type ClassObject ¶
type ClassObject struct { *NormalObject // contains filtered or unexported fields }
func (*ClassObject) ArrayClass ¶
func (this *ClassObject) ArrayClass() *ClassObject
func (*ClassObject) ClassLoader ¶
func (this *ClassObject) ClassLoader() *ClassLoader
func (*ClassObject) ConstantPool ¶
func (this *ClassObject) ConstantPool() *ConstantPool
func (*ClassObject) ElementClass ¶
func (this *ClassObject) ElementClass() *ClassObject
func (*ClassObject) GetClinitMethod ¶
func (this *ClassObject) GetClinitMethod() *Method
func (*ClassObject) GetField ¶
func (this *ClassObject) GetField(obj *NormalObject, name string, descriptor string) interface{}
func (*ClassObject) GetMainMethod ¶
func (this *ClassObject) GetMainMethod() *Method
func (*ClassObject) GetMethod ¶
func (this *ClassObject) GetMethod(name string, descriptor string) *Method
func (*ClassObject) InitStarted ¶
func (this *ClassObject) InitStarted() bool
func (*ClassObject) IsAbstract ¶
func (this *ClassObject) IsAbstract() bool
func (*ClassObject) IsArray ¶
func (this *ClassObject) IsArray() bool
func (*ClassObject) IsClassClass ¶
func (this *ClassObject) IsClassClass() bool
func (*ClassObject) IsImplClassOf ¶
func (this *ClassObject) IsImplClassOf(interfaceClass *ClassObject) bool
func (*ClassObject) IsInterface ¶
func (this *ClassObject) IsInterface() bool
func (*ClassObject) IsPrimitive ¶
func (this *ClassObject) IsPrimitive() bool
func (*ClassObject) IsPublic ¶
func (this *ClassObject) IsPublic() bool
func (*ClassObject) IsSubClassOf ¶
func (this *ClassObject) IsSubClassOf(class *ClassObject) bool
func (*ClassObject) IsSubInterfaceOf ¶
func (this *ClassObject) IsSubInterfaceOf(target *ClassObject) bool
func (*ClassObject) IsSuper ¶
func (this *ClassObject) IsSuper() bool
func (*ClassObject) JavaName ¶
func (this *ClassObject) JavaName() string
func (*ClassObject) Name ¶
func (this *ClassObject) Name() string
func (*ClassObject) NewArray ¶
func (this *ClassObject) NewArray(count int32) *ArrayObject
func (*ClassObject) NewObject ¶
func (this *ClassObject) NewObject() Object
func (*ClassObject) PackageName ¶
func (this *ClassObject) PackageName() string
func (*ClassObject) SetField ¶
func (this *ClassObject) SetField(obj *NormalObject, name string, descriptor string, value interface{})
func (*ClassObject) SourceFile ¶
func (this *ClassObject) SourceFile() string
func (*ClassObject) StartInit ¶
func (this *ClassObject) StartInit()
func (*ClassObject) StaticSlots ¶
func (this *ClassObject) StaticSlots() Slots
func (*ClassObject) SuperClass ¶
func (this *ClassObject) SuperClass() *ClassObject
type ClassSymRef ¶
type ClassSymRef struct {
SymbolicRef
}
type ConstantPool ¶
type ConstantPool struct {
// contains filtered or unexported fields
}
func (*ConstantPool) Class ¶
func (this *ConstantPool) Class() *ClassObject
func (*ConstantPool) GetConstant ¶
func (this *ConstantPool) GetConstant(index uint) Constant
type ExceptionHandler ¶
type ExceptionHandler struct {
// contains filtered or unexported fields
}
ExceptionTableEntry
func (*ExceptionHandler) EndPc ¶
func (this *ExceptionHandler) EndPc() uint16
func (*ExceptionHandler) HandlerPc ¶
func (this *ExceptionHandler) HandlerPc() uint16
func (*ExceptionHandler) StartPc ¶
func (this *ExceptionHandler) StartPc() uint16
type ExceptionTable ¶
type ExceptionTable []*ExceptionHandler
type Field ¶
type Field struct { ClassMember // contains filtered or unexported fields }
func (*Field) ConstValueIndex ¶
func (*Field) IsDoubleOrLong ¶
type FieldSymRef ¶
type FieldSymRef struct { ClassMemberSymRef // contains filtered or unexported fields }
func (*FieldSymRef) ResolvedField ¶
func (this *FieldSymRef) ResolvedField() *Field
type IMethodSymRef ¶
type IMethodSymRef interface {
ResolvedMethod() *Method
}
type InterfaceMethodSymRef ¶
type InterfaceMethodSymRef struct {
MethodSymRef
}
func (*InterfaceMethodSymRef) ResolvedInterfaceMethod ¶
func (this *InterfaceMethodSymRef) ResolvedInterfaceMethod() *Method
func (*InterfaceMethodSymRef) ResolvedMethod ¶
func (this *InterfaceMethodSymRef) ResolvedMethod() *Method
type Method ¶
type Method struct { ClassMember // contains filtered or unexported fields }
func LookupMethodInClass ¶
func LookupMethodInClass(kls *ClassObject, name string, descriptor string) *Method
func LookupMethodInInterface ¶
func LookupMethodInInterface(inf *ClassObject, name string, descriptor string) *Method
func VoidVirtualMethod ¶
func (*Method) ArgSlotCount ¶
func (*Method) Class ¶
func (this *Method) Class() *ClassObject
func (*Method) GetLineNumber ¶
func (*Method) InjectNativeCodeAttr ¶
func (*Method) IsAbstract ¶
func (*Method) LookupExceptionTable ¶
func (this *Method) LookupExceptionTable(class *ClassObject, pc uint16) *ExceptionHandler
type MethodDescriptor ¶
type MethodDescriptor struct { ParameterTypes []TypeDescriptor ReturnType TypeDescriptor }
type MethodDescriptorParser ¶
type MethodDescriptorParser struct {
// contains filtered or unexported fields
}
type MethodSymRef ¶
type MethodSymRef struct { ClassMemberSymRef // contains filtered or unexported fields }
func (*MethodSymRef) ResolvedMethod ¶
func (this *MethodSymRef) ResolvedMethod() *Method
type NormalObject ¶
type NormalObject struct { BaseObject // contains filtered or unexported fields }
func JString ¶
func JString(loader *ClassLoader, goStr string) *NormalObject
func (*NormalObject) FieldSlots ¶
func (this *NormalObject) FieldSlots() Slots
func (*NormalObject) GetExtend ¶
func (this *NormalObject) GetExtend() interface{}
func (*NormalObject) SetExtend ¶
func (this *NormalObject) SetExtend(extend interface{})
type Object ¶
type Object interface { Class() *ClassObject IsInstanceOf(targetClass *ClassObject) bool HashCode() int32 }
func Intern0 ¶
func Intern0(jStr *NormalObject) Object
type SymbolicRef ¶
type SymbolicRef struct {
// contains filtered or unexported fields
}
符号引用
func (*SymbolicRef) ResolveClassRef ¶
func (this *SymbolicRef) ResolveClassRef() *ClassObject
func (*SymbolicRef) ResolvedClass ¶
func (this *SymbolicRef) ResolvedClass() *ClassObject
type TypeDescriptor ¶
type TypeDescriptor string
https://github.com/zxh0/jvm.go/blob/129b147ebc/rtda/heap/descriptor.go https://github.com/zxh0/jvm.go/blob/129b147ebc/rtda/heap/descriptor.go https://github.com/zxh0/jvm.go/blob/129b147ebc/rtda/heap/descriptor.go
func (TypeDescriptor) IsArrayType ¶
func (td TypeDescriptor) IsArrayType() bool
func (TypeDescriptor) IsBaseType ¶
func (td TypeDescriptor) IsBaseType() bool
func (TypeDescriptor) IsLongOrDouble ¶
func (td TypeDescriptor) IsLongOrDouble() bool
func (TypeDescriptor) IsObjectType ¶
func (td TypeDescriptor) IsObjectType() bool
func (TypeDescriptor) IsVoidType ¶
func (td TypeDescriptor) IsVoidType() bool
Source Files ¶
- access_flag.go
- class_loader.go
- class_member.go
- constant_pool.go
- field.go
- mark_word.go
- method.go
- method_descriptor_parser.go
- object.go
- object_array.go
- object_class.go
- object_normal.go
- slot.go
- string_pool.go
- sym_ref_class.go
- sym_ref_class_member.go
- sym_ref_field.go
- sym_ref_interface_method.go
- sym_ref_method.go
- symbolic_reference.go
Click to show internal directories.
Click to hide internal directories.