Versions in this module Expand all Collapse all v0 v0.0.3 Mar 15, 2026 Changes in this version + const JNIGlobalRefType + const JNIInvalidRefType + const JNILocalRefType + const JNIWeakGlobalRefType + const JNI_ABORT + const JNI_COMMIT + const JNI_EDETACHED + const JNI_EEXIST + const JNI_EINVAL + const JNI_ENOMEM + const JNI_ERR + const JNI_EVERSION + const JNI_FALSE + const JNI_OK + const JNI_TRUE + const JNI_VERSION_10 + const JNI_VERSION_19 + const JNI_VERSION_1_1 + const JNI_VERSION_1_2 + const JNI_VERSION_1_4 + const JNI_VERSION_1_6 + const JNI_VERSION_1_8 + const JNI_VERSION_20 + const JNI_VERSION_21 + const JNI_VERSION_9 + var ErrDetached = Error(JNI_EDETACHED) + func EnsureProxyInit(env *Env) error + func RegisterProxyHandler(h ProxyHandler) int64 + func SetProxyClassLoader(cl *Object) + func UnregisterProxyHandler(id int64) + type Array struct + type BooleanArray struct + type ByteArray struct + type CAPIObject = capi.Object + type CharArray struct + type Class struct + type DoubleArray struct + type Env struct + func EnvFromPtr(ptr unsafe.Pointer) *Env + func (e *Env) AllocObject(cls *Class) (*Object, error) + func (e *Env) CallBooleanMethod(obj *Object, method MethodID, args ...Value) (uint8, error) + func (e *Env) CallByteMethod(obj *Object, method MethodID, args ...Value) (int8, error) + func (e *Env) CallCharMethod(obj *Object, method MethodID, args ...Value) (uint16, error) + func (e *Env) CallDoubleMethod(obj *Object, method MethodID, args ...Value) (float64, error) + func (e *Env) CallFloatMethod(obj *Object, method MethodID, args ...Value) (float32, error) + func (e *Env) CallIntMethod(obj *Object, method MethodID, args ...Value) (int32, error) + func (e *Env) CallLongMethod(obj *Object, method MethodID, args ...Value) (int64, error) + func (e *Env) CallNonvirtualBooleanMethod(obj *Object, cls *Class, method MethodID, args ...Value) (uint8, error) + func (e *Env) CallNonvirtualByteMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int8, error) + func (e *Env) CallNonvirtualCharMethod(obj *Object, cls *Class, method MethodID, args ...Value) (uint16, error) + func (e *Env) CallNonvirtualDoubleMethod(obj *Object, cls *Class, method MethodID, args ...Value) (float64, error) + func (e *Env) CallNonvirtualFloatMethod(obj *Object, cls *Class, method MethodID, args ...Value) (float32, error) + func (e *Env) CallNonvirtualIntMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int32, error) + func (e *Env) CallNonvirtualLongMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int64, error) + func (e *Env) CallNonvirtualObjectMethod(obj *Object, cls *Class, method MethodID, args ...Value) (*Object, error) + func (e *Env) CallNonvirtualShortMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int16, error) + func (e *Env) CallNonvirtualVoidMethod(obj *Object, cls *Class, method MethodID, args ...Value) error + func (e *Env) CallObjectMethod(obj *Object, method MethodID, args ...Value) (*Object, error) + func (e *Env) CallShortMethod(obj *Object, method MethodID, args ...Value) (int16, error) + func (e *Env) CallStaticBooleanMethod(cls *Class, method MethodID, args ...Value) (uint8, error) + func (e *Env) CallStaticByteMethod(cls *Class, method MethodID, args ...Value) (int8, error) + func (e *Env) CallStaticCharMethod(cls *Class, method MethodID, args ...Value) (uint16, error) + func (e *Env) CallStaticDoubleMethod(cls *Class, method MethodID, args ...Value) (float64, error) + func (e *Env) CallStaticFloatMethod(cls *Class, method MethodID, args ...Value) (float32, error) + func (e *Env) CallStaticIntMethod(cls *Class, method MethodID, args ...Value) (int32, error) + func (e *Env) CallStaticLongMethod(cls *Class, method MethodID, args ...Value) (int64, error) + func (e *Env) CallStaticObjectMethod(cls *Class, method MethodID, args ...Value) (*Object, error) + func (e *Env) CallStaticShortMethod(cls *Class, method MethodID, args ...Value) (int16, error) + func (e *Env) CallStaticVoidMethod(cls *Class, method MethodID, args ...Value) error + func (e *Env) CallVoidMethod(obj *Object, method MethodID, args ...Value) error + func (e *Env) DefineClass(name string, loader *Object, buf []byte) (*Class, error) + func (e *Env) DeleteGlobalRef(globalRef *Object) + func (e *Env) DeleteLocalRef(localRef *Object) + func (e *Env) DeleteWeakGlobalRef(ref *WeakRef) + func (e *Env) EnsureLocalCapacity(capacity int32) error + func (e *Env) ExceptionCheck() bool + func (e *Env) ExceptionClear() + func (e *Env) ExceptionDescribe() + func (e *Env) ExceptionOccurred() *Throwable + func (e *Env) FatalError(msg string) + func (e *Env) FindClass(name string) (*Class, error) + func (e *Env) FromReflectedField(field *Object) FieldID + func (e *Env) FromReflectedMethod(method *Object) MethodID + func (e *Env) GetArrayLength(array *Array) int32 + func (e *Env) GetBooleanArrayElements(array *BooleanArray, isCopy *uint8) unsafe.Pointer + func (e *Env) GetBooleanArrayRegion(array *BooleanArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) GetBooleanField(obj *Object, field FieldID) uint8 + func (e *Env) GetByteArrayElements(array *ByteArray, isCopy *uint8) unsafe.Pointer + func (e *Env) GetByteArrayRegion(array *ByteArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) GetByteField(obj *Object, field FieldID) int8 + func (e *Env) GetCharArrayElements(array *CharArray, isCopy *uint8) unsafe.Pointer + func (e *Env) GetCharArrayRegion(array *CharArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) GetCharField(obj *Object, field FieldID) uint16 + func (e *Env) GetDirectBufferAddress(buf *Object) unsafe.Pointer + func (e *Env) GetDirectBufferCapacity(buf *Object) int64 + func (e *Env) GetDoubleArrayElements(array *DoubleArray, isCopy *uint8) unsafe.Pointer + func (e *Env) GetDoubleArrayRegion(array *DoubleArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) GetDoubleField(obj *Object, field FieldID) float64 + func (e *Env) GetFieldID(cls *Class, name string, sig string) (FieldID, error) + func (e *Env) GetFloatArrayElements(array *FloatArray, isCopy *uint8) unsafe.Pointer + func (e *Env) GetFloatArrayRegion(array *FloatArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) GetFloatField(obj *Object, field FieldID) float32 + func (e *Env) GetIntArrayElements(array *IntArray, isCopy *uint8) unsafe.Pointer + func (e *Env) GetIntArrayRegion(array *IntArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) GetIntField(obj *Object, field FieldID) int32 + func (e *Env) GetLongArrayElements(array *LongArray, isCopy *uint8) unsafe.Pointer + func (e *Env) GetLongArrayRegion(array *LongArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) GetLongField(obj *Object, field FieldID) int64 + func (e *Env) GetMethodID(cls *Class, name string, sig string) (MethodID, error) + func (e *Env) GetObjectArrayElement(array *ObjectArray, index int32) (*Object, error) + func (e *Env) GetObjectClass(obj *Object) *Class + func (e *Env) GetObjectField(obj *Object, field FieldID) *Object + func (e *Env) GetObjectRefType(obj *Object) ObjectRefType + func (e *Env) GetPrimitiveArrayCritical(array *Array, isCopy *uint8) unsafe.Pointer + func (e *Env) GetShortArrayElements(array *ShortArray, isCopy *uint8) unsafe.Pointer + func (e *Env) GetShortArrayRegion(array *ShortArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) GetShortField(obj *Object, field FieldID) int16 + func (e *Env) GetStaticBooleanField(cls *Class, field FieldID) uint8 + func (e *Env) GetStaticByteField(cls *Class, field FieldID) int8 + func (e *Env) GetStaticCharField(cls *Class, field FieldID) uint16 + func (e *Env) GetStaticDoubleField(cls *Class, field FieldID) float64 + func (e *Env) GetStaticFieldID(cls *Class, name string, sig string) (FieldID, error) + func (e *Env) GetStaticFloatField(cls *Class, field FieldID) float32 + func (e *Env) GetStaticIntField(cls *Class, field FieldID) int32 + func (e *Env) GetStaticLongField(cls *Class, field FieldID) int64 + func (e *Env) GetStaticMethodID(cls *Class, name string, sig string) (MethodID, error) + func (e *Env) GetStaticObjectField(cls *Class, field FieldID) *Object + func (e *Env) GetStaticShortField(cls *Class, field FieldID) int16 + func (e *Env) GetStringChars(str *String, isCopy *uint8) (unsafe.Pointer, error) + func (e *Env) GetStringCritical(str *String, isCopy *uint8) unsafe.Pointer + func (e *Env) GetStringLength(str *String) int32 + func (e *Env) GetStringRegion(str *String, start int32, len int32, buf []uint16) error + func (e *Env) GetStringUTFChars(str *String, isCopy *uint8) (unsafe.Pointer, error) + func (e *Env) GetStringUTFLength(str *String) int32 + func (e *Env) GetStringUTFRegion(str *String, start int32, len int32, buf []byte) error + func (e *Env) GetSuperclass(cls *Class) *Class + func (e *Env) GetVersion() int32 + func (e *Env) GoString(str *String) string + func (e *Env) IsAssignableFrom(cls1 *Class, cls2 *Class) bool + func (e *Env) IsInstanceOf(obj *Object, cls *Class) bool + func (e *Env) IsSameObject(ref1 *Object, ref2 *Object) bool + func (e *Env) MonitorEnter(obj *Object) error + func (e *Env) MonitorExit(obj *Object) error + func (e *Env) NewBooleanArray(length int32) *BooleanArray + func (e *Env) NewByteArray(length int32) *ByteArray + func (e *Env) NewCharArray(length int32) *CharArray + func (e *Env) NewDirectByteBuffer(address unsafe.Pointer, capacity int64) *Object + func (e *Env) NewDoubleArray(length int32) *DoubleArray + func (e *Env) NewFloatArray(length int32) *FloatArray + func (e *Env) NewGlobalRef(obj *Object) *Object + func (e *Env) NewIntArray(length int32) *IntArray + func (e *Env) NewLocalRef(obj *Object) *Object + func (e *Env) NewLongArray(length int32) *LongArray + func (e *Env) NewObject(cls *Class, method MethodID, args ...Value) (*Object, error) + func (e *Env) NewObjectArray(length int32, elementClass *Class, initialElement *Object) (*ObjectArray, error) + func (e *Env) NewProxy(ifaces []*Class, ...) (proxy *Object, cleanup func(), err error) + func (e *Env) NewProxyFull(ifaces []*Class, handler ProxyHandlerFull) (proxy *Object, cleanup func(), err error) + func (e *Env) NewShortArray(length int32) *ShortArray + func (e *Env) NewString(unicodeChars []uint16) (*String, error) + func (e *Env) NewStringUTF(bytes string) (*String, error) + func (e *Env) NewWeakGlobalRef(obj *Object) *WeakRef + func (e *Env) PopLocalFrame(result *Object) *Object + func (e *Env) Ptr() unsafe.Pointer + func (e *Env) PushLocalFrame(capacity int32) error + func (e *Env) RegisterNatives(cls *Class, methods unsafe.Pointer, nMethods int32) error + func (e *Env) ReleaseBooleanArrayElements(array *BooleanArray, elems unsafe.Pointer, mode int32) + func (e *Env) ReleaseByteArrayElements(array *ByteArray, elems unsafe.Pointer, mode int32) + func (e *Env) ReleaseCharArrayElements(array *CharArray, elems unsafe.Pointer, mode int32) + func (e *Env) ReleaseDoubleArrayElements(array *DoubleArray, elems unsafe.Pointer, mode int32) + func (e *Env) ReleaseFloatArrayElements(array *FloatArray, elems unsafe.Pointer, mode int32) + func (e *Env) ReleaseIntArrayElements(array *IntArray, elems unsafe.Pointer, mode int32) + func (e *Env) ReleaseLongArrayElements(array *LongArray, elems unsafe.Pointer, mode int32) + func (e *Env) ReleasePrimitiveArrayCritical(array *Array, carray unsafe.Pointer, mode int32) + func (e *Env) ReleaseShortArrayElements(array *ShortArray, elems unsafe.Pointer, mode int32) + func (e *Env) ReleaseStringChars(str *String, chars unsafe.Pointer) + func (e *Env) ReleaseStringCritical(str *String, cstr unsafe.Pointer) + func (e *Env) ReleaseStringUTFChars(str *String, utf unsafe.Pointer) + func (e *Env) SetBooleanArrayRegion(array *BooleanArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) SetBooleanField(obj *Object, field FieldID, value uint8) + func (e *Env) SetByteArrayRegion(array *ByteArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) SetByteField(obj *Object, field FieldID, value int8) + func (e *Env) SetCharArrayRegion(array *CharArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) SetCharField(obj *Object, field FieldID, value uint16) + func (e *Env) SetDoubleArrayRegion(array *DoubleArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) SetDoubleField(obj *Object, field FieldID, value float64) + func (e *Env) SetFloatArrayRegion(array *FloatArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) SetFloatField(obj *Object, field FieldID, value float32) + func (e *Env) SetIntArrayRegion(array *IntArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) SetIntField(obj *Object, field FieldID, value int32) + func (e *Env) SetLongArrayRegion(array *LongArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) SetLongField(obj *Object, field FieldID, value int64) + func (e *Env) SetObjectArrayElement(array *ObjectArray, index int32, value *Object) error + func (e *Env) SetObjectField(obj *Object, field FieldID, value *Object) + func (e *Env) SetShortArrayRegion(array *ShortArray, start int32, len int32, buf unsafe.Pointer) + func (e *Env) SetShortField(obj *Object, field FieldID, value int16) + func (e *Env) SetStaticBooleanField(cls *Class, field FieldID, value uint8) + func (e *Env) SetStaticByteField(cls *Class, field FieldID, value int8) + func (e *Env) SetStaticCharField(cls *Class, field FieldID, value uint16) + func (e *Env) SetStaticDoubleField(cls *Class, field FieldID, value float64) + func (e *Env) SetStaticFloatField(cls *Class, field FieldID, value float32) + func (e *Env) SetStaticIntField(cls *Class, field FieldID, value int32) + func (e *Env) SetStaticLongField(cls *Class, field FieldID, value int64) + func (e *Env) SetStaticObjectField(cls *Class, field FieldID, value *Object) + func (e *Env) SetStaticShortField(cls *Class, field FieldID, value int16) + func (e *Env) Throw(throwable *Throwable) error + func (e *Env) ThrowNew(cls *Class, message string) error + func (e *Env) ToReflectedField(cls *Class, field FieldID, isStatic bool) *Object + func (e *Env) ToReflectedMethod(cls *Class, method MethodID, isStatic bool) *Object + func (e *Env) UnregisterNatives(cls *Class) error + type Error int32 + func (e Error) Error() string + type FieldID = capi.JfieldID + type FloatArray struct + type GlobalRef = Object + type IntArray struct + type LongArray struct + type MethodID = capi.JmethodID + type Object struct + func ObjectFromRef(ref capi.Object) *Object + func (o *Object) Ref() capi.Object + type ObjectArray struct + type ObjectRefType = capi.Jint + type ProxyHandler func(env *Env, methodName string, args []*Object) (*Object, error) + type ProxyHandlerFull func(env *Env, method *Object, methodName string, args []*Object) (*Object, error) + type ShortArray struct + type String struct + type Throwable struct + type VM struct + func VMFromPtr(ptr unsafe.Pointer) *VM + func (vm *VM) AttachCurrentThread() (*Env, error) + func (vm *VM) Do(fn func(env *Env) error) error + func (vm *VM) GetEnv(version capi.Jint) (*Env, error) + func (vm *VM) Ptr() unsafe.Pointer + type Value struct + func BooleanValue(v uint8) Value + func ByteValue(v int8) Value + func CharValue(v uint16) Value + func DoubleValue(v float64) Value + func FloatValue(v float32) Value + func IntValue(v int32) Value + func LongValue(v int64) Value + func ObjectValue(v *Object) Value + func ShortValue(v int16) Value + func (v Value) Raw() capi.Jvalue + type WeakRef struct