Documentation
¶
Index ¶
- Constants
- func CreateJVM(jvmInitArgs *JVMInitArgs) (*JVM, *Env, error)
- type ByteArray
- type Env
- func (j *Env) CallStaticMethod(className string, methodName string, returnType interface{}, ...) (interface{}, error)
- func (j *Env) DeleteGlobalRef(o *ObjectRef)
- func (j *Env) DeleteLocalRef(o *ObjectRef)
- func (j *Env) FromObjectArray(objRef *ObjectRef) []*ObjectRef
- func (j *Env) GetStaticField(className string, fieldName string, fieldType interface{}) (interface{}, error)
- func (j *Env) GetUTF8String() *ObjectRef
- func (j *Env) NewByteArray(n int) *ByteArray
- func (j *Env) NewByteArrayFromObject(o *ObjectRef) *ByteArray
- func (j *Env) NewByteArrayFromSlice(src []byte) *ByteArray
- func (j *Env) NewGlobalRef(o *ObjectRef) *ObjectRef
- func (j *Env) NewObject(className string, args ...interface{}) (*ObjectRef, error)
- func (j *Env) NoReturnConvert()
- func (j *Env) PrecalculateSignature(sig string)
- func (j *Env) RegisterNative(className, methodName string, returnType interface{}, params []interface{}, ...) error
- func (j *Env) SetStaticField(className string, fieldName string, value interface{}) error
- func (j *Env) ToObjectArray(objRefs []*ObjectRef, className string) (arrayRef *ObjectRef)
- type JVM
- type JVMInitArgs
- type ObjectArrayType
- type ObjectRef
- func (o *ObjectRef) CallMethod(env *Env, methodName string, returnType interface{}, args ...interface{}) (interface{}, error)
- func (o *ObjectRef) Cast(className string) *ObjectRef
- func (o *ObjectRef) GetField(env *Env, fieldName string, fieldType interface{}) (interface{}, error)
- func (o *ObjectRef) IsInstanceOf(env *Env, className string) (bool, error)
- func (o *ObjectRef) IsNil() bool
- func (o *ObjectRef) JObject() jobject
- func (o *ObjectRef) SetField(env *Env, fieldName string, value interface{}) error
- type ObjectType
- type Type
Constants ¶
View Source
const ( JNI_VERSION_1_2 = C.JNI_VERSION_1_2 JNI_VERSION_1_4 = C.JNI_VERSION_1_4 JNI_VERSION_1_6 = C.JNI_VERSION_1_6 DEFAULT_VERSION = JNI_VERSION_1_6 )
View Source
const ( Void = Type(1 << iota) Boolean Byte Char Short Int Long Float Double Object Array )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByteArray ¶
type ByteArray struct {
// contains filtered or unexported fields
}
func (*ByteArray) GetCritical ¶
func (*ByteArray) ReleaseCritical ¶
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
func (*Env) CallStaticMethod ¶
func (*Env) DeleteGlobalRef ¶
func (*Env) DeleteLocalRef ¶
func (*Env) FromObjectArray ¶
func (*Env) GetStaticField ¶
func (*Env) GetUTF8String ¶
return global reference to java/lang/String containing "UTF-8"
func (*Env) NewByteArray ¶
func (*Env) NewByteArrayFromObject ¶
func (*Env) NewByteArrayFromSlice ¶
func (*Env) NewGlobalRef ¶
func (*Env) NoReturnConvert ¶
func (j *Env) NoReturnConvert()
func (*Env) PrecalculateSignature ¶
func (*Env) RegisterNative ¶
func (*Env) SetStaticField ¶
type JVM ¶
type JVM struct {
// contains filtered or unexported fields
}
func (*JVM) AttachCurrentThread ¶
func (*JVM) DetachCurrentThread ¶
type JVMInitArgs ¶
type JVMInitArgs struct {
// contains filtered or unexported fields
}
func NewJVMInitArgs ¶
func NewJVMInitArgs(ignoreUnrecognizedArgs bool, includeDefaultArgs bool, version int, args []string) *JVMInitArgs
type ObjectArrayType ¶
type ObjectArrayType string
type ObjectRef ¶
type ObjectRef struct {
// contains filtered or unexported fields
}
func (*ObjectRef) CallMethod ¶
func (*ObjectRef) IsInstanceOf ¶
type ObjectType ¶
type ObjectType string
Click to show internal directories.
Click to hide internal directories.