Documentation ¶
Index ¶
- func CallBooleanMethod(e Env, obj Object, method MethodID, args ...Value) (bool, error)
- 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 GoString(e Env, str String) string
- func IsSameObject(e Env, ref1, ref2 Object) bool
- type Boolean
- type ByteArray
- type Class
- type Env
- type JVM
- type MethodID
- type Object
- type String
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallBooleanMethod ¶ added in v0.1.15
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 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 NewGlobalRef ¶
type String ¶
func JavaString ¶
JavaString converts the string to a JVM jstring.
Click to show internal directories.
Click to hide internal directories.