Documentation ¶
Index ¶
- Constants
- func ArrayCopy(src, dest *Object, srcPos, destPos, length int32)
- func GetGoString(jString *Object) string
- func ToMethodDescriptor(args *Object) string
- type ArrayBoolean
- type ArrayByte
- type ArrayChar
- type ArrayDouble
- type ArrayFloat
- type ArrayInt
- type ArrayLong
- type ArrayRef
- type ArrayShort
- type Class
- func (class *Class) ArrayClass() *Class
- func (class *Class) ClassLoader() *ClassLoader
- func (class *Class) ComponentClass() *Class
- func (class *Class) ConstantPool() *ConstantPool
- func (class *Class) GetAllDeclaredConstructors() []*Method
- func (class *Class) GetClinitMethod() *Method
- func (class *Class) GetConstructor(descriptor string) *Method
- func (class *Class) GetDeclaredConstructors(publicOnly bool) []*Method
- func (class *Class) GetDeclaredFields(publicOnly bool) []*Field
- func (class *Class) GetField(filter func(*Field) bool) *Field
- func (class *Class) GetInstanceMethod(name string, descriptor string) *Method
- func (class *Class) GetMainMethod() *Method
- func (class *Class) GetPackageName() string
- func (class *Class) GetStaticField(name, descriptor string) *Field
- func (class *Class) GetStaticMethod(name string, descriptor string) *Method
- func (class *Class) InitStarted() bool
- func (class *Class) IsAbstract() bool
- func (class *Class) IsAccessibleTo(other *Class) bool
- func (class *Class) IsAnnotation() bool
- func (class *Class) IsArray() bool
- func (class *Class) IsAssignableFrom(targetClass *Class) bool
- func (class *Class) IsEnum() bool
- func (class *Class) IsFinal() bool
- func (class *Class) IsInterface() bool
- func (class *Class) IsPrimitiveType() bool
- func (class *Class) IsPublic() bool
- func (class *Class) IsSuper() bool
- func (class *Class) IsSuperClassOf(targetClass *Class) bool
- func (class *Class) IsSynthetic() bool
- func (class *Class) JClass() *Object
- func (class *Class) JavaName() string
- func (class *Class) LookupInterfaceMethod(name, descriptor string) *Method
- func (class *Class) LookupMethod(name, descriptor string) *Method
- func (class *Class) Name() string
- func (class *Class) NewArray(length uint) *Object
- func (class *Class) NewInstance() *Object
- func (class *Class) StartInit()
- func (class *Class) StaticFields() Slots
- func (class *Class) SuperClass() *Class
- type ClassLoader
- type ClassRef
- type Constant
- type ConstantPool
- type ExceptionHandler
- type ExceptionTable
- type Field
- func (f *Field) IsEnum() bool
- func (f *Field) IsLongOrDouble() bool
- func (f *Field) IsTransient() bool
- func (f *Field) IsVolatile() bool
- func (f *Field) Match(name string, descriptor string) bool
- func (f *Field) SetStaticValue(value interface{})
- func (f *Field) SlotIndex() uint
- func (f *Field) Type() *Class
- type FieldRef
- type Frame
- type InterfaceMethodRef
- type Member
- func (m *Member) Class() *Class
- func (m *Member) Descriptor() string
- func (m *Member) IsAccessibleTo(class *Class) bool
- func (m *Member) IsFinal() bool
- func (m *Member) IsPrivate() bool
- func (m *Member) IsProtected() bool
- func (m *Member) IsPublic() bool
- func (m *Member) IsStatic() bool
- func (m *Member) IsSynthetic() bool
- func (m *Member) Name() string
- type MemberRef
- type Method
- func (m *Method) ArgSlotCount() uint
- func (m *Method) Code() []byte
- func (m *Method) FindExceptionHandlerPc(exceptionClass *Class, pc uint32) uint32
- func (m *Method) GetLineNumber(pc uint32) int
- func (m *Method) IsAbstract() bool
- func (m *Method) IsBridged() bool
- func (m *Method) IsNative() bool
- func (m *Method) IsStrict() bool
- func (m *Method) IsSynchronized() bool
- func (m *Method) IsVarArgs() bool
- type MethodDescriptor
- type MethodHandleInfo
- type MethodRef
- type NameAndTypeInfo
- type Object
- func (obj *Object) ArrayLength() int32
- func (obj *Object) Booleans() ArrayBoolean
- func (obj *Object) Bytes() ArrayByte
- func (obj *Object) Chars() ArrayChar
- func (obj *Object) Class() *Class
- func (obj *Object) Clone() *Object
- func (obj *Object) Doubles() ArrayDouble
- func (obj *Object) Fields() Slots
- func (obj *Object) Floats() ArrayFloat
- func (obj *Object) GetField(name, descriptor string) *Field
- func (obj *Object) GetFieldValue(name, descriptor string) interface{}
- func (obj *Object) Ints() ArrayInt
- func (obj *Object) IsInstanceOf(class *Class) bool
- func (obj *Object) Longs() ArrayLong
- func (obj *Object) Refs() ArrayRef
- func (obj *Object) SetFieldValue(name, descriptor string, value interface{})
- func (obj *Object) Shorts() ArrayShort
- type OperandStack
- func (s *OperandStack) Clear()
- func (s *OperandStack) GetRefFromTop(index uint16) *Object
- func (s *OperandStack) PeekSlot() Slot
- func (s *OperandStack) PopBoolean() bool
- func (s *OperandStack) PopDouble() float64
- func (s *OperandStack) PopFloat() float32
- func (s *OperandStack) PopInt() int32
- func (s *OperandStack) PopLong() int64
- func (s *OperandStack) PopRef() *Object
- func (s *OperandStack) PopSlot() Slot
- func (s *OperandStack) PushBoolean(val bool)
- func (s *OperandStack) PushDouble(val float64)
- func (s *OperandStack) PushFloat(val float32)
- func (s *OperandStack) PushInt(val int32)
- func (s *OperandStack) PushLong(val int64)
- func (s *OperandStack) PushRef(ref *Object)
- func (s *OperandStack) PushSlot(slot Slot)
- type Slot
- type Slots
- func (slots Slots) GetBoolean(index uint) bool
- func (slots Slots) GetDouble(index uint) float64
- func (slots Slots) GetFloat(index uint) float32
- func (slots Slots) GetInt(index uint) int32
- func (slots Slots) GetLong(index uint) int64
- func (slots Slots) GetRef(index uint) *Object
- func (slots Slots) GetThis() *Object
- func (slots Slots) SetBoolean(index uint, val bool)
- func (slots Slots) SetDouble(index uint, val float64)
- func (slots Slots) SetFloat(index uint, val float32)
- func (slots Slots) SetInt(index uint, val int32)
- func (slots Slots) SetLong(index uint, val int64)
- func (slots Slots) SetRef(index uint, ref *Object)
- func (slots Slots) SetSlot(index uint, slot Slot)
- type Stack
- type SymbolicRef
- type Thread
- func (t *Thread) ClearStack()
- func (t *Thread) CurrentFrame() *Frame
- func (t *Thread) GetFrames() []*Frame
- func (t *Thread) IsStackEmpty() bool
- func (t *Thread) NewFrame(method *Method) *Frame
- func (t *Thread) Pc() uint32
- func (t *Thread) PopFrame() *Frame
- func (t *Thread) PushFrame(frame *Frame)
- func (t *Thread) SetPc(pc uint32)
- func (t *Thread) StackSize() uint
- type Utf8Info
Constants ¶
View Source
const ( AccPublic = 0x0001 //class field method b9771-01836 AccPrivate = 0x0002 //field method 09007-2d0b2 AccProtected = 0x0004 //field method 5907c-32c79 AccStatic = 0x0008 //field method 9acab-5eeb8 AccFinal = 0x0010 //class filed method 0457b-892cd AccSuper = 0x0020 //class 0dfec-1842b AccSynchronized = 0x0020 //method 89dbc-8afb8 AccVolatile = 0x0040 //field 0aaba-c95ad AccBridge = 0x0040 //method 6d434-022a0 AccTransient = 0x0080 //field 699ee-84ef2 AccVarArgs = 0x0080 //method ba30a-6d0a1 AccNative = 0x0100 //method fad2f-42967 AccInterface = 0x0200 //class fe79d-16928 AccAbstract = 0x0400 //class method reverse top AccStrict = 0x0800 //method 248db-8f175 AccSynthetic = 0x1000 //class field method ec34f-206b4 AccAnnotation = 0x2000 //class 98f34-5ca7a AccEnum = 0x4000 //class field )
Variables ¶
This section is empty.
Functions ¶
func GetGoString ¶
func ToMethodDescriptor ¶
Types ¶
type ArrayBoolean ¶
type ArrayBoolean []int8
type ArrayDouble ¶
type ArrayDouble []float64
type ArrayFloat ¶
type ArrayFloat []float32
type ArrayShort ¶
type ArrayShort []int16
type Class ¶
type Class struct { AccessFlags uint16 SourceFile string Signature string AnnotationData []byte // contains filtered or unexported fields }
func (*Class) ArrayClass ¶
func (*Class) ClassLoader ¶
func (class *Class) ClassLoader() *ClassLoader
func (*Class) ComponentClass ¶
func (*Class) ConstantPool ¶
func (class *Class) ConstantPool() *ConstantPool
func (*Class) GetAllDeclaredConstructors ¶
func (*Class) GetClinitMethod ¶
func (*Class) GetConstructor ¶
func (*Class) GetDeclaredConstructors ¶
func (*Class) GetDeclaredFields ¶
func (*Class) GetInstanceMethod ¶
func (*Class) GetMainMethod ¶
func (*Class) GetPackageName ¶
func (*Class) GetStaticField ¶
func (*Class) GetStaticMethod ¶
func (*Class) InitStarted ¶
func (*Class) IsAbstract ¶
func (*Class) IsAccessibleTo ¶
func (*Class) IsAnnotation ¶
func (*Class) IsAssignableFrom ¶
func (*Class) IsInterface ¶
func (*Class) IsPrimitiveType ¶
func (*Class) IsSuperClassOf ¶
func (*Class) IsSynthetic ¶
func (*Class) LookupInterfaceMethod ¶
func (*Class) LookupMethod ¶
func (*Class) NewInstance ¶
func (*Class) StaticFields ¶
func (*Class) SuperClass ¶
type ClassLoader ¶
type ClassLoader struct {
// contains filtered or unexported fields
}
func NewClassLoader ¶
func NewClassLoader(classpath *classpath2.Classpath, verbose bool) *ClassLoader
func (*ClassLoader) FindLoadedClass ¶
func (cl *ClassLoader) FindLoadedClass(name string) *Class
func (*ClassLoader) LoadClass ¶
func (cl *ClassLoader) LoadClass(name string) *Class
type ClassRef ¶
type ClassRef struct {
SymbolicRef
}
type ConstantPool ¶
type ConstantPool struct {
// contains filtered or unexported fields
}
func (*ConstantPool) GetConstant ¶
func (cp *ConstantPool) GetConstant(index uint16) Constant
type ExceptionHandler ¶
type ExceptionTable ¶
type ExceptionTable []*ExceptionHandler
func (ExceptionTable) FindExceptionHandler ¶
func (table ExceptionTable) FindExceptionHandler(exceptionClass *Class, pc uint32) *ExceptionHandler
type Field ¶
type Field struct { Member // contains filtered or unexported fields }
func (*Field) IsLongOrDouble ¶
func (*Field) IsTransient ¶
func (*Field) IsVolatile ¶
func (*Field) SetStaticValue ¶
func (f *Field) SetStaticValue(value interface{})
type FieldRef ¶
type FieldRef struct { MemberRef // contains filtered or unexported fields }
func (*FieldRef) ResolvedField ¶
type Frame ¶
type Frame struct { LocalVars Slots OperandStack *OperandStack // contains filtered or unexported fields }
func NewMockFrame ¶
func NewMockFrame(thread *Thread, stack *OperandStack) *Frame
func (*Frame) RevertNextPc ¶
func (f *Frame) RevertNextPc()
type InterfaceMethodRef ¶
type InterfaceMethodRef struct { MemberRef // contains filtered or unexported fields }
func (*InterfaceMethodRef) ResolvedInterfaceMethod ¶
func (ref *InterfaceMethodRef) ResolvedInterfaceMethod() *Method
type Member ¶
type Member struct { AccessFlags uint16 Signature string AnnotationData []byte // contains filtered or unexported fields }
func (*Member) Descriptor ¶
func (*Member) IsAccessibleTo ¶
func (*Member) IsProtected ¶
func (*Member) IsSynthetic ¶
type MemberRef ¶
type MemberRef struct { SymbolicRef // contains filtered or unexported fields }
func (*MemberRef) Descriptor ¶
type Method ¶
type Method struct { Member MethodDescriptor *MethodDescriptor Exceptions []string ParameterAnnotationData []byte // contains filtered or unexported fields }
func (*Method) ArgSlotCount ¶
func (*Method) FindExceptionHandlerPc ¶
func (*Method) GetLineNumber ¶
func (*Method) IsAbstract ¶
func (*Method) IsSynchronized ¶
type MethodDescriptor ¶
func ParseMethodDescriptor ¶
func ParseMethodDescriptor(method *Method) *MethodDescriptor
ParseMethodDescriptor (IDLjava/lang/String;[J)V
type MethodHandleInfo ¶
type MethodHandleInfo struct { }
type MethodRef ¶
type MethodRef struct { MemberRef // contains filtered or unexported fields }
func (*MethodRef) ResolvedMethod ¶
type NameAndTypeInfo ¶
type Object ¶
type Object struct { Data interface{} Extra interface{} StackTraceElements interface{} // contains filtered or unexported fields }
func GetJString ¶
func GetJString(loader *ClassLoader, goStr string) *Object
func InternString ¶
func NewByteArray ¶
func NewByteArray(loader *ClassLoader, bytes []int8) *Object
func ToJavaClasses ¶
func ToJavaClasses(classloader *ClassLoader, classNames []string, isDescriptor bool) *Object
func (*Object) ArrayLength ¶
func (*Object) Booleans ¶
func (obj *Object) Booleans() ArrayBoolean
func (*Object) Doubles ¶
func (obj *Object) Doubles() ArrayDouble
func (*Object) Floats ¶
func (obj *Object) Floats() ArrayFloat
func (*Object) GetFieldValue ¶
func (*Object) IsInstanceOf ¶
func (*Object) SetFieldValue ¶
func (*Object) Shorts ¶
func (obj *Object) Shorts() ArrayShort
type OperandStack ¶
type OperandStack struct {
// contains filtered or unexported fields
}
func NewOperandStack ¶
func NewOperandStack(maxStack uint16) *OperandStack
func (*OperandStack) Clear ¶
func (s *OperandStack) Clear()
func (*OperandStack) GetRefFromTop ¶
func (s *OperandStack) GetRefFromTop(index uint16) *Object
func (*OperandStack) PeekSlot ¶
func (s *OperandStack) PeekSlot() Slot
func (*OperandStack) PopBoolean ¶
func (s *OperandStack) PopBoolean() bool
func (*OperandStack) PopDouble ¶
func (s *OperandStack) PopDouble() float64
func (*OperandStack) PopFloat ¶
func (s *OperandStack) PopFloat() float32
func (*OperandStack) PopInt ¶
func (s *OperandStack) PopInt() int32
func (*OperandStack) PopLong ¶
func (s *OperandStack) PopLong() int64
func (*OperandStack) PopRef ¶
func (s *OperandStack) PopRef() *Object
func (*OperandStack) PopSlot ¶
func (s *OperandStack) PopSlot() Slot
func (*OperandStack) PushBoolean ¶
func (s *OperandStack) PushBoolean(val bool)
func (*OperandStack) PushDouble ¶
func (s *OperandStack) PushDouble(val float64)
func (*OperandStack) PushFloat ¶
func (s *OperandStack) PushFloat(val float32)
func (*OperandStack) PushInt ¶
func (s *OperandStack) PushInt(val int32)
func (*OperandStack) PushLong ¶
func (s *OperandStack) PushLong(val int64)
func (*OperandStack) PushRef ¶
func (s *OperandStack) PushRef(ref *Object)
func (*OperandStack) PushSlot ¶
func (s *OperandStack) PushSlot(slot Slot)
type SymbolicRef ¶
type SymbolicRef struct {
// contains filtered or unexported fields
}
func (*SymbolicRef) ResolvedClass ¶
func (ref *SymbolicRef) ResolvedClass() *Class
type Thread ¶
type Thread struct { ExitCode int // contains filtered or unexported fields }
func (*Thread) ClearStack ¶
func (t *Thread) ClearStack()
func (*Thread) CurrentFrame ¶
func (*Thread) IsStackEmpty ¶
Source Files ¶
- access_flags.go
- array_type.go
- class.go
- class_ref.go
- class_util.go
- classloader.go
- constant_pool.go
- exception_table.go
- field.go
- field_ref.go
- frame.go
- interface_method_ref.go
- local_vars.go
- member.go
- member_ref.go
- method.go
- method_descriptor.go
- method_handle_info.go
- method_ref.go
- mock_frame.go
- name_and_type_info.go
- object.go
- operand_stack.go
- slot.go
- slots.go
- stack.go
- string_pool.go
- symbolic_ref.go
- thread.go
- utf8_info.go
Click to show internal directories.
Click to hide internal directories.