Documentation
¶
Index ¶
- func CallIntMethod(e Env, obj Object, method MethodID, args ...Value) (int32, error)
- func CallStaticIntMethod(e Env, cls Class, method MethodID, args ...Value) (int, error)
- func CallStaticVoidMethod(e Env, cls Class, method MethodID, args ...Value) error
- func CallVoidMethod(e Env, obj Object, method MethodID, args ...Value) error
- func DeleteGlobalRef(e Env, obj Object)
- func Do(vm JVM, f func(env Env) error) error
- func GetByteArrayElements(e Env, jarr ByteArray) []byte
- func GetStaticBooleanField(env Env, clazz Class, fieldID FieldID) bool
- func GetStaticByteField(env Env, clazz Class, fieldID FieldID) byte
- func GetStaticCharField(env Env, clazz Class, fieldID FieldID) byte
- func GetStaticDoubleField(env Env, clazz Class, fieldID FieldID) float64
- func GetStaticFloatField(env Env, clazz Class, fieldID FieldID) float32
- func GetStaticIntField(env Env, clazz Class, fieldID FieldID) int32
- func GetStaticLongField(env Env, clazz Class, fieldID FieldID) int64
- func GetStaticShortField(env Env, clazz Class, fieldID FieldID) int16
- func GoString(e Env, str String) string
- func IsSameObject(e Env, ref1, ref2 Object) bool
- type ByteArray
- type Class
- type Env
- type FieldID
- type JVM
- type MethodID
- type Object
- func CallObjectMethod(e Env, obj Object, method MethodID, args ...Value) (Object, error)
- func CallStaticObjectMethod(e Env, cls Class, method MethodID, args ...Value) (Object, error)
- func ClassLoaderFor(e Env, obj Object) Object
- func GetStaticObjectField(env Env, clazz Class, fieldID FieldID) Object
- func NewGlobalRef(e Env, obj Object) Object
- type String
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallIntMethod ¶
func CallStaticIntMethod ¶
func CallStaticVoidMethod ¶
func DeleteGlobalRef ¶
func Do ¶
Do invokes a function with a temporary JVM environment. The environment is not valid after the function returns.
func GetByteArrayElements ¶
GetByteArrayElements returns the contents of the array.
func GetStaticBooleanField ¶
GetStaticBooleanField looks up the value of a static field of type boolean. It panics if it is unable to find the field.
func GetStaticByteField ¶
GetStaticByteField looks up the value of a static field of type byte. It panics if it is unable to find the field.
func GetStaticCharField ¶
GetStaticCharField looks up the value of a static field of type char. It panics if it is unable to find the field.
func GetStaticDoubleField ¶
GetStaticDoubleField looks up the value of a static field of type double. It panics if it is unable to find the field.
func GetStaticFloatField ¶
GetStaticFloatField looks up the value of a static field of type float. It panics if it is unable to find the field.
func GetStaticIntField ¶
GetStaticIntField looks up the value of a static field of type int. It panics if it is unable to find the field.
func GetStaticLongField ¶
GetStaticLongField looks up the value of a static field of type long. It panics if it is unable to find the field.
func GetStaticShortField ¶
GetStaticShortField looks up the value of a static field of type short. It panics if it is unable to find the field.
func IsSameObject ¶
Types ¶
type ByteArray ¶
type ByteArray C.jbyteArray
func NewByteArray ¶
NewByteArray allocates a Java byte array with the content. It panics if the allocation fails.
type Class ¶
func GetObjectClass ¶
GetObjectClass returns the Java Class for an Object.
type MethodID ¶
func GetMethodID ¶
GetMethodID returns the id for a method. It panics if the method wasn't found.
type Object ¶
func CallObjectMethod ¶
func CallStaticObjectMethod ¶
func ClassLoaderFor ¶
ClassLoader returns a reference to the Java ClassLoader associated with obj.
func GetStaticObjectField ¶
GetStaticObjectField looks up the value of a static field of type Object. It panics if it is unable to find the field.
func NewGlobalRef ¶
type String ¶
func JavaString ¶
JavaString converts the string to a JVM jstring.