Documentation ¶
Index ¶
- Constants
- Variables
- func AllocObject(env *C.JNIEnv, clazz C.jclass) C.jobject
- func CallBooleanMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jboolean
- func CallByteMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jbyte
- func CallCharMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jchar
- func CallDoubleMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jdouble
- func CallFloatMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jfloat
- func CallIntMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jint
- func CallLongMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jlong
- func CallNonvirtualBooleanMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...) C.jboolean
- func CallNonvirtualByteMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...) C.jbyte
- func CallNonvirtualCharMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...) C.jchar
- func CallNonvirtualDoubleMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...) C.jdouble
- func CallNonvirtualFloatMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...) C.jfloat
- func CallNonvirtualIntMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...) C.jint
- func CallNonvirtualLongMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...) C.jlong
- func CallNonvirtualObjectMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...) C.jobject
- func CallNonvirtualShortMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...) C.jshort
- func CallNonvirtualVoidMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, ...)
- func CallObjectMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jobject
- func CallShortMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jshort
- func CallStaticBooleanMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jboolean
- func CallStaticByteMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jbyte
- func CallStaticCharMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jchar
- func CallStaticDoubleMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jdouble
- func CallStaticFloatMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jfloat
- func CallStaticIntMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jint
- func CallStaticLongMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jlong
- func CallStaticObjectMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jobject
- func CallStaticShortMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jshort
- func CallStaticVoidMethodA(env *C.JNIEnv, cls C.jclass, methodID C.jmethodID, args *C.jvalue)
- func CallVoidMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue)
- func DefineClass(env *C.JNIEnv, name *C.char, loader C.jobject, buf *C.jbyte, _len C.jsize) C.jclass
- func DeleteGlobalRef(env *C.JNIEnv, gref C.jobject)
- func DeleteLocalRef(env *C.JNIEnv, obj C.jobject)
- func DeleteWeakGlobalRef(env *C.JNIEnv, ref C.jweak)
- func EnsureLocalCapacity(env *C.JNIEnv, capacity C.jint) C.jint
- func ExceptionCheck(env *C.JNIEnv) C.jboolean
- func ExceptionClear(env *C.JNIEnv)
- func ExceptionDescribe(env *C.JNIEnv)
- func ExceptionOccurred(env *C.JNIEnv) C.jthrowable
- func FatalError(env *C.JNIEnv, msg *C.char)
- func FindClass(env *C.JNIEnv, name *C.char) C.jclass
- func FromReflectedField(env *C.JNIEnv, field C.jobject) C.jfieldID
- func FromReflectedMethod(env *C.JNIEnv, method C.jobject) C.jmethodID
- func GetArrayLength(env *C.JNIEnv, array C.jarray) C.jsize
- func GetBooleanArrayElements(env *C.JNIEnv, array C.jbooleanArray, isCopy *C.jboolean) *C.jboolean
- func GetBooleanArrayRegion(env *C.JNIEnv, array C.jbooleanArray, start, l C.jsize, buf *C.jboolean)
- func GetBooleanField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID) C.jboolean
- func GetByteArrayElements(env *C.JNIEnv, array C.jbyteArray, isCopy *C.jboolean) *C.jbyte
- func GetByteArrayRegion(env *C.JNIEnv, array C.jbyteArray, start, _len C.jsize, buf *C.jbyte)
- func GetByteField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID) C.jbyte
- func GetCJArray(arr unsafe.Pointer) C.jarray
- func GetCJBoolean(z unsafe.Pointer) *C.jboolean
- func GetCJBooleanArray(arr unsafe.Pointer) C.jbooleanArray
- func GetCJByte(b unsafe.Pointer) *C.jbyte
- func GetCJByteArray(arr unsafe.Pointer) C.jbyteArray
- func GetCJChar(c unsafe.Pointer) *C.jchar
- func GetCJCharArray(arr unsafe.Pointer) C.jcharArray
- func GetCJClass(clazz unsafe.Pointer) C.jclass
- func GetCJDouble(d unsafe.Pointer) *C.jdouble
- func GetCJDoubleArray(arr unsafe.Pointer) C.jdoubleArray
- func GetCJFieldID(fieldID unsafe.Pointer) C.jfieldID
- func GetCJFloat(f unsafe.Pointer) *C.jfloat
- func GetCJFloatArray(arr unsafe.Pointer) C.jfloatArray
- func GetCJInt(i unsafe.Pointer) *C.jint
- func GetCJIntArray(arr unsafe.Pointer) C.jintArray
- func GetCJLong(j unsafe.Pointer) *C.jlong
- func GetCJLongArray(arr unsafe.Pointer) C.jlongArray
- func GetCJMethodID(methodID unsafe.Pointer) C.jmethodID
- func GetCJNIEnv(env unsafe.Pointer) *C.JNIEnv
- func GetCJNINativeMethod(method unsafe.Pointer) *C.JNINativeMethod
- func GetCJObject(obj unsafe.Pointer) C.jobject
- func GetCJObjectArray(arr unsafe.Pointer) C.jobjectArray
- func GetCJShort(s unsafe.Pointer) *C.jshort
- func GetCJShortArray(arr unsafe.Pointer) C.jshortArray
- func GetCJSize(i unsafe.Pointer) *C.jsize
- func GetCJString(str unsafe.Pointer) C.jstring
- func GetCJThrowable(throw unsafe.Pointer) C.jthrowable
- func GetCJValue(v unsafe.Pointer) *C.jvalue
- func GetCJWeak(weak unsafe.Pointer) C.jweak
- func GetCJavaVM(vm unsafe.Pointer) *C.JavaVM
- func GetCharArrayElements(env *C.JNIEnv, array C.jcharArray, isCopy *C.jboolean) *C.jchar
- func GetCharArrayRegion(env *C.JNIEnv, array C.jcharArray, start, _len C.jsize, buf *C.jchar)
- func GetCharField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID) C.jchar
- func GetDefaultJNIEnv() *C.JNIEnv
- func GetDefaultJavaVM() *C.JavaVM
- func GetDirectBufferAddress(env *C.JNIEnv, buf C.jobject) unsafe.Pointer
- func GetDirectBufferCapacity(env *C.JNIEnv, buf C.jobject) C.jlong
- func GetDoubleArrayElements(env *C.JNIEnv, array C.jdoubleArray, isCopy *C.jboolean) *C.jdouble
- func GetDoubleArrayRegion(env *C.JNIEnv, array C.jdoubleArray, start, _len C.jsize, buf *C.jdouble)
- func GetDoubleField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID) C.jdouble
- func GetFieldID(env *C.JNIEnv, clazz C.jclass, name, sig *C.char) C.jfieldID
- func GetFloatArrayElements(env *C.JNIEnv, array C.jfloatArray, isCopy *C.jboolean) *C.jfloat
- func GetFloatArrayRegion(env *C.JNIEnv, array C.jfloatArray, start, _len C.jsize, buf *C.jfloat)
- func GetFloatField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID) C.jfloat
- func GetIntArrayElements(env *C.JNIEnv, array C.jintArray, isCopy *C.jboolean) *C.jint
- func GetIntArrayRegion(env *C.JNIEnv, array C.jintArray, start, _len C.jsize, buf *C.jint)
- func GetIntField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID) C.jint
- func GetJavaVM(env *C.JNIEnv, vm **C.JavaVM) C.jint
- func GetLongArrayElements(env *C.JNIEnv, array C.jlongArray, isCopy *C.jboolean) *C.jlong
- func GetLongArrayRegion(env *C.JNIEnv, array C.jlongArray, start, _len C.jsize, buf *C.jlong)
- func GetLongField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID) C.jlong
- func GetMethodID(env *C.JNIEnv, clazz C.jclass, name, sig *C.char) C.jmethodID
- func GetObjectArrayElement(env *C.JNIEnv, array C.jobjectArray, index C.jsize) C.jobject
- func GetObjectClass(env *C.JNIEnv, obj C.jobject) C.jclass
- func GetObjectField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID) C.jobject
- func GetObjectRefType(env *C.JNIEnv, obj C.jobject) C.jobjectRefType
- func GetPrimitiveArrayCritical(env *C.JNIEnv, array C.jarray, isCopy *C.jboolean) unsafe.Pointer
- func GetPtrCChar(pc unsafe.Pointer) *C.char
- func GetPtrCJValue(pv unsafe.Pointer) *C.jvalue
- func GetShortArrayElements(env *C.JNIEnv, array C.jshortArray, isCopy *C.jboolean) *C.jshort
- func GetShortArrayRegion(env *C.JNIEnv, array C.jshortArray, start, _len C.jsize, buf *C.jshort)
- func GetShortField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID) C.jshort
- func GetStaticBooleanField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID) C.jboolean
- func GetStaticByteField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID) C.jbyte
- func GetStaticCharField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID) C.jchar
- func GetStaticDoubleField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID) C.jdouble
- func GetStaticFieldID(env *C.JNIEnv, clazz C.jclass, name, sig *C.char) C.jfieldID
- func GetStaticFloatField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID) C.jfloat
- func GetStaticIntField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID) C.jint
- func GetStaticLongField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID) C.jlong
- func GetStaticMethodID(env *C.JNIEnv, clazz C.jclass, name, sig *C.char) C.jmethodID
- func GetStaticObjectField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID) C.jobject
- func GetStaticShortField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID) C.jshort
- func GetStringChars(env *C.JNIEnv, str C.jstring, isCopy *C.jboolean) *C.jchar
- func GetStringCritical(env *C.JNIEnv, string C.jstring, isCopy *C.jboolean) *C.jchar
- func GetStringLength(env *C.JNIEnv, str C.jstring) C.jsize
- func GetStringRegion(env *C.JNIEnv, str C.jstring, start, _len C.jsize, buf *C.jchar)
- func GetStringUTFChars(env *C.JNIEnv, str C.jstring, isCopy *C.jboolean) *C.char
- func GetStringUTFLength(env *C.JNIEnv, str C.jstring) C.jsize
- func GetStringUTFRegion(env *C.JNIEnv, str C.jstring, start, _len C.jsize, buf *C.char)
- func GetSuperclass(env *C.JNIEnv, sub C.jclass) C.jclass
- func GetVersion(env *C.JNIEnv) C.jint
- func GoBool(z C.jboolean) bool
- func GoFloat32(f C.jfloat) float32
- func GoFloat64(d C.jdouble) float64
- func GoInt(i C.jint) int
- func GoInt16(s C.jshort) int16
- func GoInt32(i C.jint) int32
- func GoInt32FromSize(i C.jsize) int32
- func GoInt64(j C.jlong) int64
- func GoInt8(b C.jbyte) int8
- func GoIntFromSize(i C.jsize) int
- func GoUint16(c C.jchar) uint16
- func IsAssignableFrom(env *C.JNIEnv, sub, sup C.jclass) C.jboolean
- func IsInstanceOf(env *C.JNIEnv, obj C.jobject, clazz C.jclass) C.jboolean
- func IsSameObject(env *C.JNIEnv, obj1, obj2 C.jobject) C.jboolean
- func JNI_OnLoad(vm *C.JavaVM, reserved unsafe.Pointer) C.jint
- func JValueArray(args ...interface{}) []C.jvalue
- func JValueFromJBoolean(z C.jboolean) C.jvalue
- func JValueFromJByte(b C.jbyte) C.jvalue
- func JValueFromJChar(c C.jchar) C.jvalue
- func JValueFromJDouble(d C.jdouble) C.jvalue
- func JValueFromJFloat(f C.jfloat) C.jvalue
- func JValueFromJInt(i C.jint) C.jvalue
- func JValueFromJLong(j C.jlong) C.jvalue
- func JValueFromJObject(l C.jobject) C.jvalue
- func JValueFromJShort(s C.jshort) C.jvalue
- func JValueToJBoolean(v C.jvalue) C.jboolean
- func JValueToJByte(v C.jvalue) C.jbyte
- func JValueToJChar(v C.jvalue) C.jchar
- func JValueToJDouble(v C.jvalue) C.jdouble
- func JValueToJFloat(v C.jvalue) C.jfloat
- func JValueToJInt(v C.jvalue) C.jint
- func JValueToJLong(v C.jvalue) C.jlong
- func JValueToJObject(v C.jvalue) C.jobject
- func JValueToJShort(v C.jvalue) C.jshort
- func JavaBoolean(z bool) C.jboolean
- func JavaByte(b int8) C.jbyte
- func JavaChar(c uint16) C.jchar
- func JavaDouble(d float64) C.jdouble
- func JavaFloat(f float32) C.jfloat
- func JavaIntFor32Bit(i int) C.jint
- func JavaIntFor64Bit(i int) C.jint
- func JavaIntRaw(i int32) C.jint
- func JavaLong(j int64) C.jlong
- func JavaShort(s int16) C.jshort
- func JavaSize(i int) C.jsize
- func JavaSizeRaw(i int32) C.jsize
- func MonitorEnter(env *C.JNIEnv, obj C.jobject) C.jint
- func MonitorExit(env *C.JNIEnv, obj C.jobject) C.jint
- func NewBooleanArray(env *C.JNIEnv, _len C.jsize) C.jbooleanArray
- func NewByteArray(env *C.JNIEnv, _len C.jsize) C.jbyteArray
- func NewCharArray(env *C.JNIEnv, _len C.jsize) C.jcharArray
- func NewDirectByteBuffer(env *C.JNIEnv, address unsafe.Pointer, capacity C.jlong) C.jobject
- func NewDoubleArray(env *C.JNIEnv, _len C.jsize) C.jdoubleArray
- func NewFloatArray(env *C.JNIEnv, _len C.jsize) C.jfloatArray
- func NewGlobalRef(env *C.JNIEnv, lobj C.jobject) C.jobject
- func NewIntArray(env *C.JNIEnv, _len C.jsize) C.jintArray
- func NewLocalRef(env *C.JNIEnv, ref C.jobject) C.jobject
- func NewLongArray(env *C.JNIEnv, _len C.jsize) C.jlongArray
- func NewObjectA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jobject
- func NewObjectArray(env *C.JNIEnv, _len C.jsize, clazz C.jclass, init C.jobject) C.jobjectArray
- func NewShortArray(env *C.JNIEnv, _len C.jsize) C.jshortArray
- func NewString(env *C.JNIEnv, unicode *C.jchar, _len C.jsize) C.jstring
- func NewStringUTF(env *C.JNIEnv, utf *C.char) C.jstring
- func NewWeakGlobalRef(env *C.JNIEnv, obj C.jobject) C.jweak
- func PopLocalFrame(env *C.JNIEnv, result C.jobject) C.jobject
- func PushLocalFrame(env *C.JNIEnv, capacity C.jint) C.jint
- func RegisterNatives(env *C.JNIEnv, clazz C.jclass, methods *C.JNINativeMethod, nMethods C.jint) C.jint
- func ReleaseBooleanArrayElements(env *C.JNIEnv, array C.jbooleanArray, elems *C.jboolean, mode C.jint)
- func ReleaseByteArrayElements(env *C.JNIEnv, array C.jbyteArray, elems *C.jbyte, mode C.jint)
- func ReleaseCharArrayElements(env *C.JNIEnv, array C.jcharArray, elems *C.jchar, mode C.jint)
- func ReleaseDoubleArrayElements(env *C.JNIEnv, array C.jdoubleArray, elems *C.jdouble, mode C.jint)
- func ReleaseFloatArrayElements(env *C.JNIEnv, array C.jfloatArray, elems *C.jfloat, mode C.jint)
- func ReleaseIntArrayElements(env *C.JNIEnv, array C.jintArray, elems *C.jint, mode C.jint)
- func ReleaseLongArrayElements(env *C.JNIEnv, array C.jlongArray, elems *C.jlong, mode C.jint)
- func ReleasePrimitiveArrayCritical(env *C.JNIEnv, array C.jarray, carray unsafe.Pointer, mode C.jint)
- func ReleaseShortArrayElements(env *C.JNIEnv, array C.jshortArray, elems *C.jshort, mode C.jint)
- func ReleaseStringChars(env *C.JNIEnv, str C.jstring, chars *C.jchar)
- func ReleaseStringCritical(env *C.JNIEnv, string C.jstring, cstring *C.jchar)
- func ReleaseStringUTFChars(env *C.JNIEnv, str C.jstring, chars *C.char)
- func SetBooleanArrayRegion(env *C.JNIEnv, array C.jbooleanArray, start, l C.jsize, buf *C.jboolean)
- func SetBooleanField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID, val C.jboolean)
- func SetByteArrayRegion(env *C.JNIEnv, array C.jbyteArray, start, _len C.jsize, buf *C.jbyte)
- func SetByteField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID, val C.jbyte)
- func SetCharArrayRegion(env *C.JNIEnv, array C.jcharArray, start, _len C.jsize, buf *C.jchar)
- func SetCharField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID, val C.jchar)
- func SetDoubleArrayRegion(env *C.JNIEnv, array C.jdoubleArray, start, _len C.jsize, buf *C.jdouble)
- func SetDoubleField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID, val C.jdouble)
- func SetFloatArrayRegion(env *C.JNIEnv, array C.jfloatArray, start, _len C.jsize, buf *C.jfloat)
- func SetFloatField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID, val C.jfloat)
- func SetIntArrayRegion(env *C.JNIEnv, array C.jintArray, start, _len C.jsize, buf *C.jint)
- func SetIntField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID, val C.jint)
- func SetLongArrayRegion(env *C.JNIEnv, array C.jlongArray, start, _len C.jsize, buf *C.jlong)
- func SetLongField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID, val C.jlong)
- func SetObjectArrayElement(env *C.JNIEnv, array C.jobjectArray, index C.jsize, val C.jobject)
- func SetObjectField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID, val C.jobject)
- func SetShortArrayRegion(env *C.JNIEnv, array C.jshortArray, start, _len C.jsize, buf *C.jshort)
- func SetShortField(env *C.JNIEnv, obj C.jobject, fieldID C.jfieldID, val C.jshort)
- func SetStaticBooleanField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID, value C.jboolean)
- func SetStaticByteField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID, value C.jbyte)
- func SetStaticCharField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID, value C.jchar)
- func SetStaticDoubleField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID, value C.jdouble)
- func SetStaticFloatField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID, value C.jfloat)
- func SetStaticIntField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID, value C.jint)
- func SetStaticLongField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID, value C.jlong)
- func SetStaticObjectField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID, value C.jobject)
- func SetStaticShortField(env *C.JNIEnv, clazz C.jclass, fieldID C.jfieldID, value C.jshort)
- func Throw(env *C.JNIEnv, obj C.jthrowable) C.jint
- func ThrowNew(env *C.JNIEnv, clazz C.jclass, msg *C.char) C.jint
- func ToReflectedField(env *C.JNIEnv, cls C.jclass, fieldID C.jfieldID, isStatic C.jboolean) C.jobject
- func ToReflectedMethod(env *C.JNIEnv, cls C.jclass, methodID C.jmethodID, isStatic C.jboolean) C.jobject
- func UnregisterNatives(env *C.JNIEnv, clazz C.jclass) C.jint
- func UnwrapPtrCChar(f func(unsafe.Pointer)) func(*C.char)
- func UnwrapPtrCJValue(f func(unsafe.Pointer)) func(*C.jvalue)
- func WithCString(s string, f func(*C.char))
- func WithJValueArray(va []C.jvalue, f func(*C.jvalue))
- type ClassCircularityError
- type ClassFormatError
- type JClass
- type JFieldID
- type JMethodID
- type JNIEnv
- func (env JNIEnv) AllocObject(clazz JClass) JObject
- func (env JNIEnv) CallObjectMethod(obj JObject, methodID JMethodID, args ...interface{}) JObject
- func (env JNIEnv) DefineClass(name string, loader JObject, buf []byte, _len int) (JClass, error)
- func (env JNIEnv) DeleteGlobalRef(gref JObject)
- func (env JNIEnv) DeleteLocalRef(obj JObject)
- func (env JNIEnv) EnsureLocalCapacity(capacity int) int
- func (env JNIEnv) ExceptionCheck() bool
- func (env JNIEnv) ExceptionClear()
- func (env JNIEnv) ExceptionDescribe()
- func (env JNIEnv) ExceptionOccurred() JThrowable
- func (env JNIEnv) FatalError(msg string)
- func (env JNIEnv) FindClass(name string) JClass
- func (env JNIEnv) FromReflectedField(field JObject) JFieldID
- func (env JNIEnv) FromReflectedMethod(method JObject) JMethodID
- func (env JNIEnv) GetMethodID(clazz JClass, name, sig string) JMethodID
- func (env JNIEnv) GetObjectClass(obj JObject) JClass
- func (env JNIEnv) GetStringChars(str JString) (chars []uint16, isCopy bool, err error)
- func (env JNIEnv) GetStringCritical(str JString) (cstring []uint16, isCopy bool, err error)
- func (env JNIEnv) GetStringLength(str JString) int
- func (env JNIEnv) GetStringRegion(str JString, start, _len int, buf []uint16) error
- func (env JNIEnv) GetStringUTFChars(str JString) (chars []byte, isCopy bool, err error)
- func (env JNIEnv) GetStringUTFLength(str JString) int
- func (env JNIEnv) GetStringUTFRegion(str JString, start, _len int, buf []byte) error
- func (env JNIEnv) GetSuperclass(sub JClass) JClass
- func (env JNIEnv) GetVersion() (Version, error)
- func (env JNIEnv) IsAssignableFrom(sub, sup JClass) bool
- func (env JNIEnv) IsInstanceOf(obj JObject, clazz JClass) bool
- func (env JNIEnv) IsSameObject(obj1, obj2 JObject) bool
- func (env JNIEnv) NewGlobalRef(lobj JObject) JObject
- func (env JNIEnv) NewLocalRef(ref JObject) JObject
- func (env JNIEnv) NewObject(clazz JClass, methodID JMethodID, args ...interface{}) JObject
- func (env JNIEnv) NewString(s string) (str JString, err error)
- func (env JNIEnv) NewStringUTF(s string) (str JString, err error)
- func (env JNIEnv) Peer() *C.JNIEnv
- func (env JNIEnv) PopLocalFrame(result JObject) JObject
- func (env JNIEnv) PushLocalFrame(capacity int) int
- func (env JNIEnv) ReleaseStringChars(str JString, chars []uint16)
- func (env JNIEnv) ReleaseStringCritical(str JString, cstring []uint16)
- func (env JNIEnv) ReleaseStringUTFChars(str JString, chars []byte)
- func (env JNIEnv) Throw(obj JThrowable) int
- func (env JNIEnv) ThrowNew(clazz JClass, msg string) int
- func (env JNIEnv) ToReflectedField(cls JClass, fieldID JFieldID, isStatic bool) JObject
- func (env JNIEnv) ToReflectedMethod(cls JClass, methodID JMethodID, isStatic bool) JObject
- type JObject
- type JString
- func (str JString) JObjectPeer() C.jobject
- func (str JString) ModifiedUTF8Len() int
- func (str JString) ModifiedUTF8LenE(env JNIEnv) int
- func (str JString) ModifiedUTF8Region(start, length int, buf []byte) error
- func (str JString) ModifiedUTF8RegionE(start, length int, buf []byte, env JNIEnv) error
- func (str JString) Peer() C.jstring
- func (str JString) String() string
- func (str JString) StringE(env JNIEnv) string
- func (str JString) StringRaw() (s string, err error)
- func (str JString) StringRawE(env JNIEnv) (s string, err error)
- func (str JString) UTF16Len() int
- func (str JString) UTF16LenE(env JNIEnv) int
- func (str JString) UTF16Region(start, length int, buf []uint16) error
- func (str JString) UTF16RegionE(start, length int, buf []uint16, env JNIEnv) error
- func (str JString) WithModifiedUTF8Bytes(consumer func(bytes []byte, isCopy bool)) error
- func (str JString) WithModifiedUTF8BytesE(consumer func(bytes []byte, isCopy bool), env JNIEnv) error
- func (str JString) WithUTF16Chars(consumer func(chars []uint16, isCopy bool)) error
- func (str JString) WithUTF16CharsCritical(consumer func(chars []uint16, isCopy bool)) error
- func (str JString) WithUTF16CharsCriticalE(consumer func(chars []uint16, isCopy bool), env JNIEnv) error
- func (str JString) WithUTF16CharsE(consumer func(chars []uint16, isCopy bool), env JNIEnv) error
- type JThrowable
- type JWeak
- type JavaVM
- type OutOfMemoryError
- type SecurityException
- type Throwable
- type Version
Constants ¶
const ( // To prevent the values from not being defined in C side, // actual values are used. JNIInvalidRefType = 0 JNILocalRefType = 1 JNIGlobalRefType = 2 JNIWeakGlobalRefType = 3 )
jni.h:
/* Return values from jobjectRefType */ typedef enum _jobjectType { JNIInvalidRefType = 0, JNILocalRefType = 1, JNIGlobalRefType = 2, JNIWeakGlobalRefType = 3 } jobjectRefType;
const ( JNI_FALSE = 0 JNI_TRUE = 1 )
jni.h:
/* * jboolean constants */ #define JNI_FALSE 0 #define JNI_TRUE 1
const ( JNI_OK = 0 JNI_ERR = -1 JNI_EDETACHED = -2 JNI_EVERSION = -3 JNI_ENOMEM = -4 JNI_EEXIST = -5 JNI_EINVAL = -6 )
jni.h:
/* * possible return values for JNI functions. */ #define JNI_OK 0 /* success */ #define JNI_ERR (-1) /* unknown error */ #define JNI_EDETACHED (-2) /* thread detached from the VM */ #define JNI_EVERSION (-3) /* JNI version error */ #define JNI_ENOMEM (-4) /* not enough memory */ #define JNI_EEXIST (-5) /* VM already created */ #define JNI_EINVAL (-6) /* invalid arguments */
const ( JNI_COMMIT = 1 JNI_ABORT = 2 )
jni.h:
/* * used in ReleaseScalarArrayElements */ #define JNI_COMMIT 1 #define JNI_ABORT 2
Variables ¶
var Errors = []error{ errors.New("JNI_OK: Success"), errors.New("JNI_ERR: Unknown error"), errors.New("JNI_EDETACHED: Thread detached from the VM"), errors.New("JNI_EVERSION: JNI version error"), errors.New("JNI_ENOMEM: Not enough memory"), errors.New("JNI_EEXIST: VM already created"), errors.New("JNI_EINVAL: Invalid arguments"), }
var JavaInt = func() func(int) C.jint { if ^uint(0)>>32 == 0 { return JavaIntFor32Bit } return JavaIntFor64Bit }()
Functions ¶
func CallBooleanMethodA ¶
func CallBooleanMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jboolean
jni.h:
jboolean (JNICALL *CallBooleanMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); jboolean (JNICALL *CallBooleanMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); jboolean (JNICALL *CallBooleanMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
func CallByteMethodA ¶
jni.h:
jbyte (JNICALL *CallByteMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); jbyte (JNICALL *CallByteMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); jbyte (JNICALL *CallByteMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
func CallCharMethodA ¶
jni.h:
jchar (JNICALL *CallCharMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); jchar (JNICALL *CallCharMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); jchar (JNICALL *CallCharMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
func CallDoubleMethodA ¶
func CallDoubleMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jdouble
jni.h:
jdouble (JNICALL *CallDoubleMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); jdouble (JNICALL *CallDoubleMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); jdouble (JNICALL *CallDoubleMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
func CallFloatMethodA ¶
jni.h:
jfloat (JNICALL *CallFloatMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); jfloat (JNICALL *CallFloatMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); jfloat (JNICALL *CallFloatMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
func CallIntMethodA ¶
jni.h:
jint (JNICALL *CallIntMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); jint (JNICALL *CallIntMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); jint (JNICALL *CallIntMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
func CallLongMethodA ¶
jni.h:
jlong (JNICALL *CallLongMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); jlong (JNICALL *CallLongMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); jlong (JNICALL *CallLongMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
func CallNonvirtualBooleanMethodA ¶
func CallNonvirtualBooleanMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jboolean
jni.h:
jboolean (JNICALL *CallNonvirtualBooleanMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); jboolean (JNICALL *CallNonvirtualBooleanMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); jboolean (JNICALL *CallNonvirtualBooleanMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue * args);
func CallNonvirtualByteMethodA ¶
func CallNonvirtualByteMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jbyte
jni.h:
jbyte (JNICALL *CallNonvirtualByteMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); jbyte (JNICALL *CallNonvirtualByteMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); jbyte (JNICALL *CallNonvirtualByteMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue *args);
func CallNonvirtualCharMethodA ¶
func CallNonvirtualCharMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jchar
jni.h:
jchar (JNICALL *CallNonvirtualCharMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); jchar (JNICALL *CallNonvirtualCharMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); jchar (JNICALL *CallNonvirtualCharMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue *args);
func CallNonvirtualDoubleMethodA ¶
func CallNonvirtualDoubleMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jdouble
jni.h:
jdouble (JNICALL *CallNonvirtualDoubleMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); jdouble (JNICALL *CallNonvirtualDoubleMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); jdouble (JNICALL *CallNonvirtualDoubleMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue *args);
func CallNonvirtualFloatMethodA ¶
func CallNonvirtualFloatMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jfloat
jni.h:
jfloat (JNICALL *CallNonvirtualFloatMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); jfloat (JNICALL *CallNonvirtualFloatMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); jfloat (JNICALL *CallNonvirtualFloatMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue *args);
func CallNonvirtualIntMethodA ¶
func CallNonvirtualIntMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jint
jni.h:
jint (JNICALL *CallNonvirtualIntMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); jint (JNICALL *CallNonvirtualIntMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); jint (JNICALL *CallNonvirtualIntMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue *args);
func CallNonvirtualLongMethodA ¶
func CallNonvirtualLongMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jlong
jni.h:
jlong (JNICALL *CallNonvirtualLongMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); jlong (JNICALL *CallNonvirtualLongMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); jlong (JNICALL *CallNonvirtualLongMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue *args);
func CallNonvirtualObjectMethodA ¶
func CallNonvirtualObjectMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jobject
jni.h:
jobject (JNICALL *CallNonvirtualObjectMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); jobject (JNICALL *CallNonvirtualObjectMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); jobject (JNICALL *CallNonvirtualObjectMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue * args);
func CallNonvirtualShortMethodA ¶
func CallNonvirtualShortMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jshort
jni.h:
jshort (JNICALL *CallNonvirtualShortMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); jshort (JNICALL *CallNonvirtualShortMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); jshort (JNICALL *CallNonvirtualShortMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue *args);
func CallNonvirtualVoidMethodA ¶
func CallNonvirtualVoidMethodA(env *C.JNIEnv, obj C.jobject, clazz C.jclass, methodID C.jmethodID, args *C.jvalue)
jni.h:
void (JNICALL *CallNonvirtualVoidMethod)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); void (JNICALL *CallNonvirtualVoidMethodV)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args); void (JNICALL *CallNonvirtualVoidMethodA)(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue * args);
func CallObjectMethodA ¶
func CallObjectMethodA(env *C.JNIEnv, obj C.jobject, methodID C.jmethodID, args *C.jvalue) C.jobject
jni.h:
jobject (JNICALL *CallObjectMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); jobject (JNICALL *CallObjectMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); jobject (JNICALL *CallObjectMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
func CallShortMethodA ¶
jni.h:
jshort (JNICALL *CallShortMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); jshort (JNICALL *CallShortMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); jshort (JNICALL *CallShortMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
func CallStaticBooleanMethodA ¶
func CallStaticBooleanMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jboolean
jni.h:
jboolean (JNICALL *CallStaticBooleanMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jboolean (JNICALL *CallStaticBooleanMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jboolean (JNICALL *CallStaticBooleanMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func CallStaticByteMethodA ¶
func CallStaticByteMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jbyte
jni.h:
jbyte (JNICALL *CallStaticByteMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jbyte (JNICALL *CallStaticByteMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jbyte (JNICALL *CallStaticByteMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func CallStaticCharMethodA ¶
func CallStaticCharMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jchar
jni.h:
jchar (JNICALL *CallStaticCharMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jchar (JNICALL *CallStaticCharMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jchar (JNICALL *CallStaticCharMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func CallStaticDoubleMethodA ¶
func CallStaticDoubleMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jdouble
jni.h:
jdouble (JNICALL *CallStaticDoubleMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jdouble (JNICALL *CallStaticDoubleMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jdouble (JNICALL *CallStaticDoubleMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func CallStaticFloatMethodA ¶
func CallStaticFloatMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jfloat
jni.h:
jfloat (JNICALL *CallStaticFloatMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jfloat (JNICALL *CallStaticFloatMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jfloat (JNICALL *CallStaticFloatMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func CallStaticIntMethodA ¶
func CallStaticIntMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jint
jni.h:
jint (JNICALL *CallStaticIntMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jint (JNICALL *CallStaticIntMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jint (JNICALL *CallStaticIntMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func CallStaticLongMethodA ¶
func CallStaticLongMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jlong
jni.h:
jlong (JNICALL *CallStaticLongMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jlong (JNICALL *CallStaticLongMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jlong (JNICALL *CallStaticLongMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func CallStaticObjectMethodA ¶
func CallStaticObjectMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jobject
jni.h:
jobject (JNICALL *CallStaticObjectMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jobject (JNICALL *CallStaticObjectMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jobject (JNICALL *CallStaticObjectMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func CallStaticShortMethodA ¶
func CallStaticShortMethodA(env *C.JNIEnv, clazz C.jclass, methodID C.jmethodID, args *C.jvalue) C.jshort
jni.h:
jshort (JNICALL *CallStaticShortMethod)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jshort (JNICALL *CallStaticShortMethodV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jshort (JNICALL *CallStaticShortMethodA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func CallStaticVoidMethodA ¶
jni.h:
void (JNICALL *CallStaticVoidMethod)(JNIEnv *env, jclass cls, jmethodID methodID, ...); void (JNICALL *CallStaticVoidMethodV)(JNIEnv *env, jclass cls, jmethodID methodID, va_list args); void (JNICALL *CallStaticVoidMethodA)(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args);
func CallVoidMethodA ¶
jni.h:
void (JNICALL *CallVoidMethod)(JNIEnv *env, jobject obj, jmethodID methodID, ...); void (JNICALL *CallVoidMethodV)(JNIEnv *env, jobject obj, jmethodID methodID, va_list args); void (JNICALL *CallVoidMethodA)(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
func DefineClass ¶
func DefineClass(env *C.JNIEnv, name *C.char, loader C.jobject, buf *C.jbyte, _len C.jsize) C.jclass
jni.h:
jclass (JNICALL *DefineClass)(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len);
func ExceptionOccurred ¶
func ExceptionOccurred(env *C.JNIEnv) C.jthrowable
jni.h:
jthrowable (JNICALL *ExceptionOccurred)(JNIEnv *env);
func FromReflectedField ¶
jni.h:
jfieldID (JNICALL *FromReflectedField)(JNIEnv *env, jobject field);
func FromReflectedMethod ¶
jni.h:
jmethodID (JNICALL *FromReflectedMethod)(JNIEnv *env, jobject method);
func GetBooleanArrayElements ¶
jni.h:
jboolean * (JNICALL *GetBooleanArrayElements)(JNIEnv *env, jbooleanArray array, jboolean *isCopy);
func GetBooleanArrayRegion ¶
jni.h:
void (JNICALL *GetBooleanArrayRegion)(JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
func GetBooleanField ¶
jni.h:
jboolean (JNICALL *GetBooleanField)(JNIEnv *env, jobject obj, jfieldID fieldID);
func GetByteArrayElements ¶
jni.h:
jbyte * (JNICALL *GetByteArrayElements)(JNIEnv *env, jbyteArray array, jboolean *isCopy);
func GetByteArrayRegion ¶
jni.h:
void (JNICALL *GetByteArrayRegion)(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
func GetByteField ¶
jni.h:
jbyte (JNICALL *GetByteField)(JNIEnv *env, jobject obj, jfieldID fieldID);
func GetCJBooleanArray ¶
func GetCJBooleanArray(arr unsafe.Pointer) C.jbooleanArray
func GetCJByteArray ¶
func GetCJByteArray(arr unsafe.Pointer) C.jbyteArray
func GetCJCharArray ¶
func GetCJCharArray(arr unsafe.Pointer) C.jcharArray
func GetCJDoubleArray ¶
func GetCJDoubleArray(arr unsafe.Pointer) C.jdoubleArray
func GetCJFloatArray ¶
func GetCJFloatArray(arr unsafe.Pointer) C.jfloatArray
func GetCJLongArray ¶
func GetCJLongArray(arr unsafe.Pointer) C.jlongArray
func GetCJNINativeMethod ¶
func GetCJNINativeMethod(method unsafe.Pointer) *C.JNINativeMethod
func GetCJObjectArray ¶
func GetCJObjectArray(arr unsafe.Pointer) C.jobjectArray
func GetCJShortArray ¶
func GetCJShortArray(arr unsafe.Pointer) C.jshortArray
func GetCJThrowable ¶
func GetCJThrowable(throw unsafe.Pointer) C.jthrowable
func GetCharArrayElements ¶
jni.h:
jchar * (JNICALL *GetCharArrayElements)(JNIEnv *env, jcharArray array, jboolean *isCopy);
func GetCharArrayRegion ¶
jni.h:
void (JNICALL *GetCharArrayRegion)(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
func GetCharField ¶
jni.h:
jchar (JNICALL *GetCharField)(JNIEnv *env, jobject obj, jfieldID fieldID);
func GetDefaultJavaVM ¶
func GetDirectBufferAddress ¶
jni.h:
void* (JNICALL *GetDirectBufferAddress)(JNIEnv* env, jobject buf);
func GetDirectBufferCapacity ¶
jni.h:
jlong (JNICALL *GetDirectBufferCapacity)(JNIEnv* env, jobject buf);
func GetDoubleArrayElements ¶
jni.h:
jdouble * (JNICALL *GetDoubleArrayElements)(JNIEnv *env, jdoubleArray array, jboolean *isCopy);
func GetDoubleArrayRegion ¶
jni.h:
void (JNICALL *GetDoubleArrayRegion)(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
func GetDoubleField ¶
jni.h:
jdouble (JNICALL *GetDoubleField)(JNIEnv *env, jobject obj, jfieldID fieldID);
func GetFieldID ¶
jni.h:
jfieldID (JNICALL *GetFieldID)(JNIEnv *env, jclass clazz, const char *name, const char *sig);
func GetFloatArrayElements ¶
jni.h:
jfloat * (JNICALL *GetFloatArrayElements)(JNIEnv *env, jfloatArray array, jboolean *isCopy);
func GetFloatArrayRegion ¶
jni.h:
void (JNICALL *GetFloatArrayRegion)(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
func GetFloatField ¶
jni.h:
jfloat (JNICALL *GetFloatField)(JNIEnv *env, jobject obj, jfieldID fieldID);
func GetIntArrayElements ¶
jni.h:
jint * (JNICALL *GetIntArrayElements)(JNIEnv *env, jintArray array, jboolean *isCopy);
func GetIntArrayRegion ¶
jni.h:
void (JNICALL *GetIntArrayRegion)(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
func GetLongArrayElements ¶
jni.h:
jlong * (JNICALL *GetLongArrayElements)(JNIEnv *env, jlongArray array, jboolean *isCopy);
func GetLongArrayRegion ¶
jni.h:
void (JNICALL *GetLongArrayRegion)(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
func GetLongField ¶
jni.h:
jlong (JNICALL *GetLongField)(JNIEnv *env, jobject obj, jfieldID fieldID);
func GetMethodID ¶
jni.h:
jmethodID (JNICALL *GetMethodID)(JNIEnv *env, jclass clazz, const char *name, const char *sig);
func GetObjectArrayElement ¶
jni.h:
jobject (JNICALL *GetObjectArrayElement)(JNIEnv *env, jobjectArray array, jsize index);
func GetObjectField ¶
jni.h:
jobject (JNICALL *GetObjectField)(JNIEnv *env, jobject obj, jfieldID fieldID);
func GetObjectRefType ¶
jni.h:
jobjectRefType (JNICALL *GetObjectRefType)(JNIEnv* env, jobject obj);
func GetPrimitiveArrayCritical ¶
jni.h:
void * (JNICALL *GetPrimitiveArrayCritical)(JNIEnv *env, jarray array, jboolean *isCopy);
func GetShortArrayElements ¶
jni.h:
jshort * (JNICALL *GetShortArrayElements)(JNIEnv *env, jshortArray array, jboolean *isCopy);
func GetShortArrayRegion ¶
jni.h:
void (JNICALL *GetShortArrayRegion)(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
func GetShortField ¶
jni.h:
jshort (JNICALL *GetShortField)(JNIEnv *env, jobject obj, jfieldID fieldID);
func GetStaticBooleanField ¶
jni.h:
jboolean (JNICALL *GetStaticBooleanField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
func GetStaticByteField ¶
jni.h:
jbyte (JNICALL *GetStaticByteField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
func GetStaticCharField ¶
jni.h:
jchar (JNICALL *GetStaticCharField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
func GetStaticDoubleField ¶
jni.h:
jdouble (JNICALL *GetStaticDoubleField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
func GetStaticFieldID ¶
jni.h:
jfieldID (JNICALL *GetStaticFieldID)(JNIEnv *env, jclass clazz, const char *name, const char *sig);
func GetStaticFloatField ¶
jni.h:
jfloat (JNICALL *GetStaticFloatField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
func GetStaticIntField ¶
jni.h:
jint (JNICALL *GetStaticIntField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
func GetStaticLongField ¶
jni.h:
jlong (JNICALL *GetStaticLongField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
func GetStaticMethodID ¶
jni.h:
jmethodID (JNICALL *GetStaticMethodID)(JNIEnv *env, jclass clazz, const char *name, const char *sig);
func GetStaticObjectField ¶
jni.h:
jobject (JNICALL *GetStaticObjectField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
func GetStaticShortField ¶
jni.h:
jshort (JNICALL *GetStaticShortField)(JNIEnv *env, jclass clazz, jfieldID fieldID);
func GetStringChars ¶
jni.h:
const jchar *(JNICALL *GetStringChars)(JNIEnv *env, jstring str, jboolean *isCopy);
func GetStringCritical ¶
jni.h:
const jchar * (JNICALL *GetStringCritical)(JNIEnv *env, jstring string, jboolean *isCopy);
func GetStringRegion ¶
jni.h:
void (JNICALL *GetStringRegion)(JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
func GetStringUTFChars ¶
jni.h:
const char* (JNICALL *GetStringUTFChars)(JNIEnv *env, jstring str, jboolean *isCopy);
func GetStringUTFRegion ¶
jni.h:
void (JNICALL *GetStringUTFRegion)(JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
func GoInt ¶
From https://golang.org/ref/spec#Numeric_types:
uint either 32 or 64 bits int same size as uint uintptr an unsigned integer large enough to store the uninterpreted bits of a pointer value
func GoInt32FromSize ¶
func GoIntFromSize ¶
func IsAssignableFrom ¶
jni.h:
jboolean (JNICALL *IsAssignableFrom)(JNIEnv *env, jclass sub, jclass sup);
func IsInstanceOf ¶
jni.h:
jboolean (JNICALL *IsInstanceOf)(JNIEnv *env, jobject obj, jclass clazz);
func IsSameObject ¶
jni.h:
jboolean (JNICALL *IsSameObject)(JNIEnv *env, jobject obj1, jobject obj2);
func JValueArray ¶
func JavaBoolean ¶
func JavaDouble ¶
func JavaIntFor32Bit ¶
func JavaIntFor64Bit ¶
From https://golang.org/ref/spec#Numeric_types:
uint either 32 or 64 bits int same size as uint uintptr an unsigned integer large enough to store the uninterpreted bits of a pointer value
func JavaIntRaw ¶
func JavaSizeRaw ¶
func NewDirectByteBuffer ¶
jni.h:
jobject (JNICALL *NewDirectByteBuffer)(JNIEnv* env, void* address, jlong capacity);
func NewObjectA ¶
jni.h:
jobject (JNICALL *NewObject)(JNIEnv *env, jclass clazz, jmethodID methodID, ...); jobject (JNICALL *NewObjectV)(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); jobject (JNICALL *NewObjectA)(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
func NewObjectArray ¶
jni.h:
jobjectArray (JNICALL *NewObjectArray)(JNIEnv *env, jsize len, jclass clazz, jobject init);
func RegisterNatives ¶
func RegisterNatives(env *C.JNIEnv, clazz C.jclass, methods *C.JNINativeMethod, nMethods C.jint) C.jint
jni.h:
jint (JNICALL *RegisterNatives)(JNIEnv *env, jclass clazz, const JNINativeMethod *methods, jint nMethods);
func ReleaseBooleanArrayElements ¶
func ReleaseBooleanArrayElements(env *C.JNIEnv, array C.jbooleanArray, elems *C.jboolean, mode C.jint)
jni.h:
void (JNICALL *ReleaseBooleanArrayElements)(JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
func ReleaseByteArrayElements ¶
jni.h:
void (JNICALL *ReleaseByteArrayElements)(JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
func ReleaseCharArrayElements ¶
jni.h:
void (JNICALL *ReleaseCharArrayElements)(JNIEnv *env, jcharArray array, jchar *elems, jint mode);
func ReleaseDoubleArrayElements ¶
jni.h:
void (JNICALL *ReleaseDoubleArrayElements)(JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
func ReleaseFloatArrayElements ¶
jni.h:
void (JNICALL *ReleaseFloatArrayElements)(JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
func ReleaseIntArrayElements ¶
jni.h:
void (JNICALL *ReleaseIntArrayElements)(JNIEnv *env, jintArray array, jint *elems, jint mode);
func ReleaseLongArrayElements ¶
jni.h:
void (JNICALL *ReleaseLongArrayElements)(JNIEnv *env, jlongArray array, jlong *elems, jint mode);
func ReleasePrimitiveArrayCritical ¶
func ReleasePrimitiveArrayCritical(env *C.JNIEnv, array C.jarray, carray unsafe.Pointer, mode C.jint)
jni.h:
void (JNICALL *ReleasePrimitiveArrayCritical)(JNIEnv *env, jarray array, void *carray, jint mode);
func ReleaseShortArrayElements ¶
jni.h:
void (JNICALL *ReleaseShortArrayElements)(JNIEnv *env, jshortArray array, jshort *elems, jint mode);
func ReleaseStringChars ¶
jni.h:
void (JNICALL *ReleaseStringChars)(JNIEnv *env, jstring str, const jchar *chars);
func ReleaseStringCritical ¶
jni.h:
void (JNICALL *ReleaseStringCritical)(JNIEnv *env, jstring string, const jchar *cstring);
func ReleaseStringUTFChars ¶
jni.h:
void (JNICALL *ReleaseStringUTFChars)(JNIEnv *env, jstring str, const char* chars);
func SetBooleanArrayRegion ¶
jni.h:
void (JNICALL *SetBooleanArrayRegion)(JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf);
func SetBooleanField ¶
jni.h:
void (JNICALL *SetBooleanField)(JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
func SetByteArrayRegion ¶
jni.h:
void (JNICALL *SetByteArrayRegion)(JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf);
func SetByteField ¶
jni.h:
void (JNICALL *SetByteField)(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
func SetCharArrayRegion ¶
jni.h:
void (JNICALL *SetCharArrayRegion)(JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf);
func SetCharField ¶
jni.h:
void (JNICALL *SetCharField)(JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
func SetDoubleArrayRegion ¶
jni.h:
void (JNICALL *SetDoubleArrayRegion)(JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf);
func SetDoubleField ¶
jni.h:
void (JNICALL *SetDoubleField)(JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
func SetFloatArrayRegion ¶
jni.h:
void (JNICALL *SetFloatArrayRegion)(JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf);
func SetFloatField ¶
jni.h:
void (JNICALL *SetFloatField)(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
func SetIntArrayRegion ¶
jni.h:
void (JNICALL *SetIntArrayRegion)(JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf);
func SetIntField ¶
jni.h:
void (JNICALL *SetIntField)(JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
func SetLongArrayRegion ¶
jni.h:
void (JNICALL *SetLongArrayRegion)(JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf);
func SetLongField ¶
jni.h:
void (JNICALL *SetLongField)(JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
func SetObjectArrayElement ¶
jni.h:
void (JNICALL *SetObjectArrayElement)(JNIEnv *env, jobjectArray array, jsize index, jobject val);
func SetObjectField ¶
jni.h:
void (JNICALL *SetObjectField)(JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
func SetShortArrayRegion ¶
jni.h:
void (JNICALL *SetShortArrayRegion)(JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf);
func SetShortField ¶
jni.h:
void (JNICALL *SetShortField)(JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
func SetStaticBooleanField ¶
jni.h:
void (JNICALL *SetStaticBooleanField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
func SetStaticByteField ¶
jni.h:
void (JNICALL *SetStaticByteField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
func SetStaticCharField ¶
jni.h:
void (JNICALL *SetStaticCharField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
func SetStaticDoubleField ¶
jni.h:
void (JNICALL *SetStaticDoubleField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
func SetStaticFloatField ¶
jni.h:
void (JNICALL *SetStaticFloatField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
func SetStaticIntField ¶
jni.h:
void (JNICALL *SetStaticIntField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
func SetStaticLongField ¶
jni.h:
void (JNICALL *SetStaticLongField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
func SetStaticObjectField ¶
jni.h:
void (JNICALL *SetStaticObjectField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
func SetStaticShortField ¶
jni.h:
void (JNICALL *SetStaticShortField)(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
func ToReflectedField ¶
func ToReflectedField(env *C.JNIEnv, cls C.jclass, fieldID C.jfieldID, isStatic C.jboolean) C.jobject
jni.h:
jobject (JNICALL *ToReflectedField)(JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
func ToReflectedMethod ¶
func ToReflectedMethod(env *C.JNIEnv, cls C.jclass, methodID C.jmethodID, isStatic C.jboolean) C.jobject
jni.h:
jobject (JNICALL *ToReflectedMethod)(JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
Types ¶
type ClassCircularityError ¶
type ClassCircularityError Throwable
type ClassFormatError ¶
type ClassFormatError Throwable
type JFieldID ¶
type JFieldID uintptr
jni.h:
struct _jfieldID; typedef struct _jfieldID *jfieldID;
func GoJFieldID ¶
type JMethodID ¶
type JMethodID uintptr
jni.h:
struct _jmethodID; typedef struct _jmethodID *jmethodID;
func GoJMethodID ¶
type JNIEnv ¶
type JNIEnv uintptr
jni.h:
/* * JNI Native Method Interface. */ struct JNINativeInterface_; typedef const struct JNINativeInterface_ *JNIEnv;
func (JNIEnv) AllocObject ¶
func (JNIEnv) CallObjectMethod ¶
func (JNIEnv) DefineClass ¶
func (JNIEnv) DeleteGlobalRef ¶
func (JNIEnv) DeleteLocalRef ¶
func (JNIEnv) EnsureLocalCapacity ¶
func (JNIEnv) ExceptionCheck ¶
func (JNIEnv) ExceptionClear ¶
func (env JNIEnv) ExceptionClear()
func (JNIEnv) ExceptionDescribe ¶
func (env JNIEnv) ExceptionDescribe()
func (JNIEnv) ExceptionOccurred ¶
func (env JNIEnv) ExceptionOccurred() JThrowable
func (JNIEnv) FatalError ¶
func (JNIEnv) FromReflectedField ¶
func (JNIEnv) FromReflectedMethod ¶
func (JNIEnv) GetObjectClass ¶
func (JNIEnv) GetStringChars ¶
GetStringChars is a middle-level API. Use JString.WithChars{,E} from jstring.go for general purposes.
func (JNIEnv) GetStringCritical ¶
ReleaseStringUTFChars is a middle-level API.
func (JNIEnv) GetStringLength ¶
GetStringLength is a middle-level API. Use JString.Len{,E} from jstring.go for general purposes.
func (JNIEnv) GetStringRegion ¶
ReleaseStringUTFChars is a middle-level API.
func (JNIEnv) GetStringUTFChars ¶
GetStringUTFChars is a middle-level API. Use JString.WithUTFChars{,E} from jstring.go for general purposes.
func (JNIEnv) GetStringUTFLength ¶
GetStringUTFLength is a middle-level API. Use JString.UTFLen{,E} from jstring.go for general purposes.
func (JNIEnv) GetStringUTFRegion ¶
ReleaseStringUTFChars is a middle-level API.
func (JNIEnv) GetSuperclass ¶
func (JNIEnv) GetVersion ¶
func (JNIEnv) IsAssignableFrom ¶
func (JNIEnv) IsSameObject ¶
func (JNIEnv) NewGlobalRef ¶
func (JNIEnv) NewLocalRef ¶
func (JNIEnv) NewString ¶
NewString is a middle-level API. Use JStringFromGoString{,E} from jstring.go for general purposes.
func (JNIEnv) NewStringUTF ¶
NewStringUTF is a middle-level API. In JNI, this function allows the caller to provide a "modified UTF-8" buffer, instead of a UTF-16 buffer as in NewString. However, this makes no difference in this wrapper, since the parameter type is a Go string. As a result, this duplicats the functionality of NewString. This function exists for completeness only. Use JStringFromGoString{,E} from jstring.go for general purposes.
func (JNIEnv) PopLocalFrame ¶
func (JNIEnv) PushLocalFrame ¶
func (JNIEnv) ReleaseStringChars ¶
ReleaseStringChars is a middle-level API. Use JString.WithChars{,E} from jstring.go for general purposes.
func (JNIEnv) ReleaseStringCritical ¶
ReleaseStringUTFChars is a middle-level API.
func (JNIEnv) ReleaseStringUTFChars ¶
ReleaseStringUTFChars is a middle-level API. Use JString.WithUTFChars{,E} from jstring.go for general purposes.
func (JNIEnv) Throw ¶
func (env JNIEnv) Throw(obj JThrowable) int
func (JNIEnv) ToReflectedField ¶
type JObject ¶
type JObject uintptr
jni.h:
struct _jobject; typedef struct _jobject *jobject;
func (JObject) JObjectPeer ¶
type JString ¶
type JString JObject
jni.h:
typedef jobject jstring;
func JStringFromGoString ¶
JStringFromGoString creates a JString from a Go string. It is the high-level API for the NewString JNI function. errors: NilReturnValueError, OutOfMemoryError
func JStringFromGoStringE ¶
JStringFromGoStringE is like JStringFromGoString, but it accepts a custom JNIEnv. It calls the underlying functions with the provided JNIEnv. errors: NilReturnValueError, OutOfMemoryError
func (JString) JObjectPeer ¶
func (JString) ModifiedUTF8Len ¶
ModifiedUTF8Len returns the length of the JString in number of "modified UTF-8" characters. It is the high-level API for the GetStringUTFLength JNI function.
func (JString) ModifiedUTF8LenE ¶
ModifiedUTF8LenE is like ModifiedUTF8Len, but it accepts a custom JNIEnv. It calls the underlying functions with the provided JNIEnv.
func (JString) ModifiedUTF8Region ¶
TODO: Doc errors: StringIndexOutOfBoundsException
func (JString) ModifiedUTF8RegionE ¶
TODO: Doc errors: StringIndexOutOfBoundsException
func (JString) String ¶
String creates a Go string from a JString. It implements the fmt.Stringer interface. It calls StringRaw for the actual work. If the returned "err" field is not nil, it panics.
func (JString) StringE ¶
StringE is like String, but it accepts a custom JNIEnv. It calls the underlying functions with the provided JNIEnv.
func (JString) StringRawE ¶
StringRawE is like StringRaw, but it accepts a custom JNIEnv. It calls the underlying functions with the provided JNIEnv. errors:
func (JString) UTF16Len ¶
UTF16Len returns the length of the JString in number of UTF-16 characters. It is the high-level API for the GetStringLength JNI function.
func (JString) UTF16LenE ¶
UTF16LenE is like UTF16Len, but it accepts a custom JNIEnv. It calls the underlying functions with the provided JNIEnv.
func (JString) UTF16Region ¶
TODO: Doc errors: StringIndexOutOfBoundsException
func (JString) UTF16RegionE ¶
TODO: Doc errors: StringIndexOutOfBoundsException
func (JString) WithModifiedUTF8Bytes ¶
WithModifiedUTF8Bytes lets the caller to work with the "modified UTF-8" characters contained in the JString. It is the high-level API for the GetStringUTFChars and ReleaseStringUTFChars JNI functions. In the callback function (consumer), "chars" is the slice containing the "modified UTF-8" characters, and "isCopy" indicates whether a copy of the C array is made by the JVM, or the underlying C array of the Java String is returned directly. "chars" points directly to whatever value the underlying call returns, so if "isCopy" is false, the caller MUST NOT modify any element in "chars". errors: NilReturnValueError
func (JString) WithModifiedUTF8BytesE ¶
func (str JString) WithModifiedUTF8BytesE(consumer func(bytes []byte, isCopy bool), env JNIEnv) error
WithModifiedUTF8BytesE is like WithModifiedUTF8Bytes, but it accepts a custom JNIEnv. It calls the underlying functions with the provided JNIEnv. errors: NilReturnValueError
func (JString) WithUTF16Chars ¶
WithUTF16Chars lets the caller to work with the UTF-16 characters contained in the JString. It is the high-level API for the GetStringChars and ReleaseStringChars JNI functions. In the callback function (consumer), "chars" is the slice containing the UTF-16 characters, and "isCopy" indicates whether a copy of the C array is made by the JVM, or the underlying C array of the Java String is returned directly. "chars" points directly to whatever value the underlying call returns, so if "isCopy" is false, the caller MUST NOT modify any element in "chars". errors: NilReturnValueError
func (JString) WithUTF16CharsCritical ¶
TODO: Doc errors: NilReturnValueError
type JThrowable ¶
type JThrowable JObject
jni.h:
typedef jobject jthrowable;
func GoJThrowable ¶
func GoJThrowable(peer C.jthrowable) JThrowable
func (JThrowable) GetMessage ¶
func (t JThrowable) GetMessage() string
This must be implemented with low level API, since JNIEnv.CallObjectMethod() calls this method
func (JThrowable) JObjectPeer ¶
func (throw JThrowable) JObjectPeer() C.jobject
func (JThrowable) Peer ¶
func (throw JThrowable) Peer() C.jthrowable
type JavaVM ¶
type JavaVM uintptr
jni.h:
/* * JNI Invocation Interface. */ struct JNIInvokeInterface_; typedef const struct JNIInvokeInterface_ *JavaVM;
type OutOfMemoryError ¶
type OutOfMemoryError Throwable
type SecurityException ¶
type SecurityException Throwable
type Throwable ¶
type Throwable struct {
// contains filtered or unexported fields
}
func ToThrowable ¶
func ToThrowable(t JThrowable) Throwable
func (Throwable) Error ¶
Implements the built-in "error" interface See: https://golang.org/ref/spec#Errors