Documentation
¶
Overview ¶
Package jni provides idiomatic Go bindings for the Java Native Interface (JNI).
The root package exposes the idiomatic API: Env, VM, Class, Object, String, Array, MethodID, FieldID, Value, and related types. All JNI exceptions are converted to Go errors. Thread safety is handled via VM.Do().
The raw CGo bindings live in the capi/ sub-package. Most users should not need to import capi/ directly.
Code in this package is generated by jnigen from spec/jni.yaml and spec/overlays/jni.yaml. Do not edit generated files; edit the spec and overlay instead, then run `make jni`.
Index ¶
- Constants
- Variables
- func EnsureProxyInit(env *Env) error
- func RegisterProxyHandler(h ProxyHandler) int64
- func SetProxyClassLoader(cl *Object)
- func UnregisterProxyHandler(id int64)
- type Array
- type BooleanArray
- type ByteArray
- type CAPIObject
- type CharArray
- type Class
- type DoubleArray
- type 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
- type FieldID
- type FloatArray
- type GlobalRef
- type IntArray
- type LongArray
- type MethodID
- type Object
- type ObjectArray
- type ObjectRefType
- type ProxyHandler
- type ProxyHandlerFull
- type ShortArray
- type String
- type Throwable
- type VM
- type Value
- type WeakRef
Constants ¶
const ( JNI_VERSION_1_1 = capi.JNI_VERSION_1_1 JNI_VERSION_1_2 = capi.JNI_VERSION_1_2 JNI_VERSION_1_4 = capi.JNI_VERSION_1_4 JNI_VERSION_1_6 = capi.JNI_VERSION_1_6 JNI_VERSION_1_8 = capi.JNI_VERSION_1_8 JNI_VERSION_9 = capi.JNI_VERSION_9 JNI_VERSION_10 = capi.JNI_VERSION_10 JNI_VERSION_19 = capi.JNI_VERSION_19 JNI_VERSION_20 = capi.JNI_VERSION_20 JNI_VERSION_21 = capi.JNI_VERSION_21 )
JNI version constants.
const ( JNI_FALSE = capi.JNI_FALSE JNI_TRUE = capi.JNI_TRUE )
JNI boolean constants.
const ( JNI_COMMIT = capi.JNI_COMMIT JNI_ABORT = capi.JNI_ABORT )
JNI array release mode constants.
const ( JNIInvalidRefType = capi.JNIInvalidRefType JNILocalRefType = capi.JNILocalRefType JNIGlobalRefType = capi.JNIGlobalRefType JNIWeakGlobalRefType = capi.JNIWeakGlobalRefType )
JNI object reference type constants.
const ( JNI_OK = Error(0) JNI_ERR = Error(-1) JNI_EDETACHED = Error(-2) JNI_EVERSION = Error(-3) JNI_ENOMEM = Error(-4) JNI_EEXIST = Error(-5) JNI_EINVAL = Error(-6) )
JNI error constants.
Variables ¶
var ErrDetached = Error(JNI_EDETACHED)
ErrDetached is returned by VM.GetEnv when the current thread is not attached to the JVM.
Functions ¶
func EnsureProxyInit ¶
EnsureProxyInit performs one-time initialization of the proxy infrastructure (native method registration for GoInvocationHandler and GoAbstractDispatch). Safe to call multiple times.
func RegisterProxyHandler ¶
func RegisterProxyHandler(h ProxyHandler) int64
RegisterProxyHandler stores a basic ProxyHandler in the global registry and returns a unique handler ID. This is used by the gRPC server layer when creating abstract class adapter proxies (which dispatch without a Method object). Call UnregisterProxyHandler when the proxy is no longer needed.
func SetProxyClassLoader ¶
func SetProxyClassLoader(cl *Object)
SetProxyClassLoader sets a fallback ClassLoader that proxy init uses to find GoInvocationHandler when JNI FindClass fails. Call this with the APK's ClassLoader (from Context.getClassLoader()) before creating any proxies. The caller must pass a global ref (not a local ref).
func UnregisterProxyHandler ¶
func UnregisterProxyHandler(id int64)
UnregisterProxyHandler removes a handler by ID from the global registry.
Types ¶
type BooleanArray ¶
type BooleanArray struct {
Array
}
BooleanArray wraps the JNI jbooleanArray reference type.
type ByteArray ¶
type ByteArray struct {
Array
}
ByteArray wraps the JNI jbyteArray reference type.
type CAPIObject ¶
CAPIObject is an alias for capi.Object (C.jobject), exported so that packages outside capi can reference the type for unsafe conversions between different CGO compilation units.
type CharArray ¶
type CharArray struct {
Array
}
CharArray wraps the JNI jcharArray reference type.
type DoubleArray ¶
type DoubleArray struct {
Array
}
DoubleArray wraps the JNI jdoubleArray reference type.
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
Env wraps a JNIEnv pointer. It is only valid on the OS thread where it was obtained. Use VM.Do() to get a valid Env.
func EnvFromPtr ¶
EnvFromPtr creates an Env from a raw JNIEnv pointer.
func (*Env) AllocObject ¶
AllocObject wraps the JNI AllocObject function.
func (*Env) CallBooleanMethod ¶
CallBooleanMethod wraps the JNI CallBooleanMethodA function.
func (*Env) CallByteMethod ¶
CallByteMethod wraps the JNI CallByteMethodA function.
func (*Env) CallCharMethod ¶
CallCharMethod wraps the JNI CallCharMethodA function.
func (*Env) CallDoubleMethod ¶
CallDoubleMethod wraps the JNI CallDoubleMethodA function.
func (*Env) CallFloatMethod ¶
CallFloatMethod wraps the JNI CallFloatMethodA function.
func (*Env) CallIntMethod ¶
CallIntMethod wraps the JNI CallIntMethodA function.
func (*Env) CallLongMethod ¶
CallLongMethod wraps the JNI CallLongMethodA function.
func (*Env) CallNonvirtualBooleanMethod ¶
func (e *Env) CallNonvirtualBooleanMethod(obj *Object, cls *Class, method MethodID, args ...Value) (uint8, error)
CallNonvirtualBooleanMethod wraps the JNI CallNonvirtualBooleanMethodA function.
func (*Env) CallNonvirtualByteMethod ¶
func (e *Env) CallNonvirtualByteMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int8, error)
CallNonvirtualByteMethod wraps the JNI CallNonvirtualByteMethodA function.
func (*Env) CallNonvirtualCharMethod ¶
func (e *Env) CallNonvirtualCharMethod(obj *Object, cls *Class, method MethodID, args ...Value) (uint16, error)
CallNonvirtualCharMethod wraps the JNI CallNonvirtualCharMethodA function.
func (*Env) CallNonvirtualDoubleMethod ¶
func (e *Env) CallNonvirtualDoubleMethod(obj *Object, cls *Class, method MethodID, args ...Value) (float64, error)
CallNonvirtualDoubleMethod wraps the JNI CallNonvirtualDoubleMethodA function.
func (*Env) CallNonvirtualFloatMethod ¶
func (e *Env) CallNonvirtualFloatMethod(obj *Object, cls *Class, method MethodID, args ...Value) (float32, error)
CallNonvirtualFloatMethod wraps the JNI CallNonvirtualFloatMethodA function.
func (*Env) CallNonvirtualIntMethod ¶
func (e *Env) CallNonvirtualIntMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int32, error)
CallNonvirtualIntMethod wraps the JNI CallNonvirtualIntMethodA function.
func (*Env) CallNonvirtualLongMethod ¶
func (e *Env) CallNonvirtualLongMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int64, error)
CallNonvirtualLongMethod wraps the JNI CallNonvirtualLongMethodA function.
func (*Env) CallNonvirtualObjectMethod ¶
func (e *Env) CallNonvirtualObjectMethod(obj *Object, cls *Class, method MethodID, args ...Value) (*Object, error)
CallNonvirtualObjectMethod wraps the JNI CallNonvirtualObjectMethodA function.
func (*Env) CallNonvirtualShortMethod ¶
func (e *Env) CallNonvirtualShortMethod(obj *Object, cls *Class, method MethodID, args ...Value) (int16, error)
CallNonvirtualShortMethod wraps the JNI CallNonvirtualShortMethodA function.
func (*Env) CallNonvirtualVoidMethod ¶
func (e *Env) CallNonvirtualVoidMethod(obj *Object, cls *Class, method MethodID, args ...Value) error
CallNonvirtualVoidMethod wraps the JNI CallNonvirtualVoidMethodA function.
func (*Env) CallObjectMethod ¶
CallObjectMethod wraps the JNI CallObjectMethodA function.
func (*Env) CallShortMethod ¶
CallShortMethod wraps the JNI CallShortMethodA function.
func (*Env) CallStaticBooleanMethod ¶
CallStaticBooleanMethod wraps the JNI CallStaticBooleanMethodA function.
func (*Env) CallStaticByteMethod ¶
CallStaticByteMethod wraps the JNI CallStaticByteMethodA function.
func (*Env) CallStaticCharMethod ¶
CallStaticCharMethod wraps the JNI CallStaticCharMethodA function.
func (*Env) CallStaticDoubleMethod ¶
CallStaticDoubleMethod wraps the JNI CallStaticDoubleMethodA function.
func (*Env) CallStaticFloatMethod ¶
CallStaticFloatMethod wraps the JNI CallStaticFloatMethodA function.
func (*Env) CallStaticIntMethod ¶
CallStaticIntMethod wraps the JNI CallStaticIntMethodA function.
func (*Env) CallStaticLongMethod ¶
CallStaticLongMethod wraps the JNI CallStaticLongMethodA function.
func (*Env) CallStaticObjectMethod ¶
CallStaticObjectMethod wraps the JNI CallStaticObjectMethodA function.
func (*Env) CallStaticShortMethod ¶
CallStaticShortMethod wraps the JNI CallStaticShortMethodA function.
func (*Env) CallStaticVoidMethod ¶
CallStaticVoidMethod wraps the JNI CallStaticVoidMethodA function.
func (*Env) CallVoidMethod ¶
CallVoidMethod wraps the JNI CallVoidMethodA function.
func (*Env) DefineClass ¶
DefineClass wraps the JNI DefineClass function.
func (*Env) DeleteGlobalRef ¶
DeleteGlobalRef wraps the JNI DeleteGlobalRef function.
func (*Env) DeleteLocalRef ¶
DeleteLocalRef wraps the JNI DeleteLocalRef function.
func (*Env) DeleteWeakGlobalRef ¶
DeleteWeakGlobalRef wraps the JNI DeleteWeakGlobalRef function.
func (*Env) EnsureLocalCapacity ¶
EnsureLocalCapacity wraps the JNI EnsureLocalCapacity function.
func (*Env) ExceptionCheck ¶
ExceptionCheck wraps the JNI ExceptionCheck function.
func (*Env) ExceptionClear ¶
func (e *Env) ExceptionClear()
ExceptionClear wraps the JNI ExceptionClear function.
func (*Env) ExceptionDescribe ¶
func (e *Env) ExceptionDescribe()
ExceptionDescribe wraps the JNI ExceptionDescribe function.
func (*Env) ExceptionOccurred ¶
ExceptionOccurred wraps the JNI ExceptionOccurred function.
func (*Env) FatalError ¶
FatalError wraps the JNI FatalError function.
func (*Env) FromReflectedField ¶
FromReflectedField wraps the JNI FromReflectedField function.
func (*Env) FromReflectedMethod ¶
FromReflectedMethod wraps the JNI FromReflectedMethod function.
func (*Env) GetArrayLength ¶
GetArrayLength wraps the JNI GetArrayLength function.
func (*Env) GetBooleanArrayElements ¶
func (e *Env) GetBooleanArrayElements(array *BooleanArray, isCopy *uint8) unsafe.Pointer
GetBooleanArrayElements wraps the JNI GetBooleanArrayElements function.
func (*Env) GetBooleanArrayRegion ¶
func (e *Env) GetBooleanArrayRegion(array *BooleanArray, start int32, len int32, buf unsafe.Pointer)
GetBooleanArrayRegion wraps the JNI GetBooleanArrayRegion function.
func (*Env) GetBooleanField ¶
GetBooleanField wraps the JNI GetBooleanField function.
func (*Env) GetByteArrayElements ¶
GetByteArrayElements wraps the JNI GetByteArrayElements function.
func (*Env) GetByteArrayRegion ¶
GetByteArrayRegion wraps the JNI GetByteArrayRegion function.
func (*Env) GetByteField ¶
GetByteField wraps the JNI GetByteField function.
func (*Env) GetCharArrayElements ¶
GetCharArrayElements wraps the JNI GetCharArrayElements function.
func (*Env) GetCharArrayRegion ¶
GetCharArrayRegion wraps the JNI GetCharArrayRegion function.
func (*Env) GetCharField ¶
GetCharField wraps the JNI GetCharField function.
func (*Env) GetDirectBufferAddress ¶
GetDirectBufferAddress wraps the JNI GetDirectBufferAddress function.
func (*Env) GetDirectBufferCapacity ¶
GetDirectBufferCapacity wraps the JNI GetDirectBufferCapacity function.
func (*Env) GetDoubleArrayElements ¶
func (e *Env) GetDoubleArrayElements(array *DoubleArray, isCopy *uint8) unsafe.Pointer
GetDoubleArrayElements wraps the JNI GetDoubleArrayElements function.
func (*Env) GetDoubleArrayRegion ¶
GetDoubleArrayRegion wraps the JNI GetDoubleArrayRegion function.
func (*Env) GetDoubleField ¶
GetDoubleField wraps the JNI GetDoubleField function.
func (*Env) GetFieldID ¶
GetFieldID wraps the JNI GetFieldID function.
func (*Env) GetFloatArrayElements ¶
func (e *Env) GetFloatArrayElements(array *FloatArray, isCopy *uint8) unsafe.Pointer
GetFloatArrayElements wraps the JNI GetFloatArrayElements function.
func (*Env) GetFloatArrayRegion ¶
GetFloatArrayRegion wraps the JNI GetFloatArrayRegion function.
func (*Env) GetFloatField ¶
GetFloatField wraps the JNI GetFloatField function.
func (*Env) GetIntArrayElements ¶
GetIntArrayElements wraps the JNI GetIntArrayElements function.
func (*Env) GetIntArrayRegion ¶
GetIntArrayRegion wraps the JNI GetIntArrayRegion function.
func (*Env) GetIntField ¶
GetIntField wraps the JNI GetIntField function.
func (*Env) GetLongArrayElements ¶
GetLongArrayElements wraps the JNI GetLongArrayElements function.
func (*Env) GetLongArrayRegion ¶
GetLongArrayRegion wraps the JNI GetLongArrayRegion function.
func (*Env) GetLongField ¶
GetLongField wraps the JNI GetLongField function.
func (*Env) GetMethodID ¶
GetMethodID wraps the JNI GetMethodID function.
func (*Env) GetObjectArrayElement ¶
func (e *Env) GetObjectArrayElement(array *ObjectArray, index int32) (*Object, error)
GetObjectArrayElement wraps the JNI GetObjectArrayElement function.
func (*Env) GetObjectClass ¶
GetObjectClass wraps the JNI GetObjectClass function.
func (*Env) GetObjectField ¶
GetObjectField wraps the JNI GetObjectField function.
func (*Env) GetObjectRefType ¶
func (e *Env) GetObjectRefType(obj *Object) ObjectRefType
GetObjectRefType wraps the JNI GetObjectRefType function.
func (*Env) GetPrimitiveArrayCritical ¶
GetPrimitiveArrayCritical wraps the JNI GetPrimitiveArrayCritical function.
func (*Env) GetShortArrayElements ¶
func (e *Env) GetShortArrayElements(array *ShortArray, isCopy *uint8) unsafe.Pointer
GetShortArrayElements wraps the JNI GetShortArrayElements function.
func (*Env) GetShortArrayRegion ¶
GetShortArrayRegion wraps the JNI GetShortArrayRegion function.
func (*Env) GetShortField ¶
GetShortField wraps the JNI GetShortField function.
func (*Env) GetStaticBooleanField ¶
GetStaticBooleanField wraps the JNI GetStaticBooleanField function.
func (*Env) GetStaticByteField ¶
GetStaticByteField wraps the JNI GetStaticByteField function.
func (*Env) GetStaticCharField ¶
GetStaticCharField wraps the JNI GetStaticCharField function.
func (*Env) GetStaticDoubleField ¶
GetStaticDoubleField wraps the JNI GetStaticDoubleField function.
func (*Env) GetStaticFieldID ¶
GetStaticFieldID wraps the JNI GetStaticFieldID function.
func (*Env) GetStaticFloatField ¶
GetStaticFloatField wraps the JNI GetStaticFloatField function.
func (*Env) GetStaticIntField ¶
GetStaticIntField wraps the JNI GetStaticIntField function.
func (*Env) GetStaticLongField ¶
GetStaticLongField wraps the JNI GetStaticLongField function.
func (*Env) GetStaticMethodID ¶
GetStaticMethodID wraps the JNI GetStaticMethodID function.
func (*Env) GetStaticObjectField ¶
GetStaticObjectField wraps the JNI GetStaticObjectField function.
func (*Env) GetStaticShortField ¶
GetStaticShortField wraps the JNI GetStaticShortField function.
func (*Env) GetStringChars ¶
GetStringChars wraps the JNI GetStringChars function.
func (*Env) GetStringCritical ¶
GetStringCritical wraps the JNI GetStringCritical function.
func (*Env) GetStringLength ¶
GetStringLength wraps the JNI GetStringLength function.
func (*Env) GetStringRegion ¶
GetStringRegion wraps the JNI GetStringRegion function.
func (*Env) GetStringUTFChars ¶
GetStringUTFChars wraps the JNI GetStringUTFChars function.
func (*Env) GetStringUTFLength ¶
GetStringUTFLength wraps the JNI GetStringUTFLength function.
func (*Env) GetStringUTFRegion ¶
GetStringUTFRegion wraps the JNI GetStringUTFRegion function.
func (*Env) GetSuperclass ¶
GetSuperclass wraps the JNI GetSuperclass function.
func (*Env) GetVersion ¶
GetVersion wraps the JNI GetVersion function.
func (*Env) GoString ¶
GoString converts a JNI String to a Go string using modified UTF-8 encoding. If str is nil, it returns an empty string.
func (*Env) IsAssignableFrom ¶
IsAssignableFrom wraps the JNI IsAssignableFrom function.
func (*Env) IsInstanceOf ¶
IsInstanceOf wraps the JNI IsInstanceOf function.
func (*Env) IsSameObject ¶
IsSameObject wraps the JNI IsSameObject function.
func (*Env) MonitorEnter ¶
MonitorEnter wraps the JNI MonitorEnter function.
func (*Env) MonitorExit ¶
MonitorExit wraps the JNI MonitorExit function.
func (*Env) NewBooleanArray ¶
func (e *Env) NewBooleanArray(length int32) *BooleanArray
NewBooleanArray wraps the JNI NewBooleanArray function.
func (*Env) NewByteArray ¶
NewByteArray wraps the JNI NewByteArray function.
func (*Env) NewCharArray ¶
NewCharArray wraps the JNI NewCharArray function.
func (*Env) NewDirectByteBuffer ¶
NewDirectByteBuffer wraps the JNI NewDirectByteBuffer function.
func (*Env) NewDoubleArray ¶
func (e *Env) NewDoubleArray(length int32) *DoubleArray
NewDoubleArray wraps the JNI NewDoubleArray function.
func (*Env) NewFloatArray ¶
func (e *Env) NewFloatArray(length int32) *FloatArray
NewFloatArray wraps the JNI NewFloatArray function.
func (*Env) NewGlobalRef ¶
NewGlobalRef wraps the JNI NewGlobalRef function.
func (*Env) NewIntArray ¶
NewIntArray wraps the JNI NewIntArray function.
func (*Env) NewLocalRef ¶
NewLocalRef wraps the JNI NewLocalRef function.
func (*Env) NewLongArray ¶
NewLongArray wraps the JNI NewLongArray function.
func (*Env) NewObjectArray ¶
func (e *Env) NewObjectArray(length int32, elementClass *Class, initialElement *Object) (*ObjectArray, error)
NewObjectArray wraps the JNI NewObjectArray function.
func (*Env) NewProxy ¶
func (e *Env) NewProxy( ifaces []*Class, handler func(env *Env, methodName string, args []*Object) (*Object, error), ) (proxy *Object, cleanup func(), err error)
NewProxy creates a java.lang.reflect.Proxy that implements the given Java interfaces, dispatching all method calls to the Go handler.
The handler receives the method name and an array of arguments (as *Object, with boxed primitives). It returns a result *Object (or nil for void) and an optional error (which becomes a RuntimeException on the Java side).
The returned cleanup function MUST be called when the proxy is no longer needed, to remove the handler from the global registry. Failing to call cleanup leaks memory.
Example:
proxy, cleanup, err := env.NewProxy(
[]*Class{listenerClass},
func(env *Env, method string, args []*Object) (*Object, error) {
switch method {
case "onLocationChanged":
// handle location update
}
return nil, nil
},
)
defer cleanup()
func (*Env) NewProxyFull ¶
func (e *Env) NewProxyFull( ifaces []*Class, handler ProxyHandlerFull, ) (proxy *Object, cleanup func(), err error)
NewProxyFull creates a java.lang.reflect.Proxy like NewProxy, but dispatches to a ProxyHandlerFull that also receives the java.lang.reflect.Method object. This allows the handler to inspect the method's return type (e.g. to detect void callbacks).
See NewProxy for full documentation on usage and cleanup semantics.
func (*Env) NewShortArray ¶
func (e *Env) NewShortArray(length int32) *ShortArray
NewShortArray wraps the JNI NewShortArray function.
func (*Env) NewStringUTF ¶
NewStringUTF wraps the JNI NewStringUTF function.
func (*Env) NewWeakGlobalRef ¶
NewWeakGlobalRef wraps the JNI NewWeakGlobalRef function.
func (*Env) PopLocalFrame ¶
PopLocalFrame wraps the JNI PopLocalFrame function.
func (*Env) PushLocalFrame ¶
PushLocalFrame wraps the JNI PushLocalFrame function.
func (*Env) RegisterNatives ¶
RegisterNatives wraps the JNI RegisterNatives function.
func (*Env) ReleaseBooleanArrayElements ¶
func (e *Env) ReleaseBooleanArrayElements(array *BooleanArray, elems unsafe.Pointer, mode int32)
ReleaseBooleanArrayElements wraps the JNI ReleaseBooleanArrayElements function.
func (*Env) ReleaseByteArrayElements ¶
ReleaseByteArrayElements wraps the JNI ReleaseByteArrayElements function.
func (*Env) ReleaseCharArrayElements ¶
ReleaseCharArrayElements wraps the JNI ReleaseCharArrayElements function.
func (*Env) ReleaseDoubleArrayElements ¶
func (e *Env) ReleaseDoubleArrayElements(array *DoubleArray, elems unsafe.Pointer, mode int32)
ReleaseDoubleArrayElements wraps the JNI ReleaseDoubleArrayElements function.
func (*Env) ReleaseFloatArrayElements ¶
func (e *Env) ReleaseFloatArrayElements(array *FloatArray, elems unsafe.Pointer, mode int32)
ReleaseFloatArrayElements wraps the JNI ReleaseFloatArrayElements function.
func (*Env) ReleaseIntArrayElements ¶
ReleaseIntArrayElements wraps the JNI ReleaseIntArrayElements function.
func (*Env) ReleaseLongArrayElements ¶
ReleaseLongArrayElements wraps the JNI ReleaseLongArrayElements function.
func (*Env) ReleasePrimitiveArrayCritical ¶
ReleasePrimitiveArrayCritical wraps the JNI ReleasePrimitiveArrayCritical function.
func (*Env) ReleaseShortArrayElements ¶
func (e *Env) ReleaseShortArrayElements(array *ShortArray, elems unsafe.Pointer, mode int32)
ReleaseShortArrayElements wraps the JNI ReleaseShortArrayElements function.
func (*Env) ReleaseStringChars ¶
ReleaseStringChars wraps the JNI ReleaseStringChars function.
func (*Env) ReleaseStringCritical ¶
ReleaseStringCritical wraps the JNI ReleaseStringCritical function.
func (*Env) ReleaseStringUTFChars ¶
ReleaseStringUTFChars wraps the JNI ReleaseStringUTFChars function.
func (*Env) SetBooleanArrayRegion ¶
func (e *Env) SetBooleanArrayRegion(array *BooleanArray, start int32, len int32, buf unsafe.Pointer)
SetBooleanArrayRegion wraps the JNI SetBooleanArrayRegion function.
func (*Env) SetBooleanField ¶
SetBooleanField wraps the JNI SetBooleanField function.
func (*Env) SetByteArrayRegion ¶
SetByteArrayRegion wraps the JNI SetByteArrayRegion function.
func (*Env) SetByteField ¶
SetByteField wraps the JNI SetByteField function.
func (*Env) SetCharArrayRegion ¶
SetCharArrayRegion wraps the JNI SetCharArrayRegion function.
func (*Env) SetCharField ¶
SetCharField wraps the JNI SetCharField function.
func (*Env) SetDoubleArrayRegion ¶
SetDoubleArrayRegion wraps the JNI SetDoubleArrayRegion function.
func (*Env) SetDoubleField ¶
SetDoubleField wraps the JNI SetDoubleField function.
func (*Env) SetFloatArrayRegion ¶
SetFloatArrayRegion wraps the JNI SetFloatArrayRegion function.
func (*Env) SetFloatField ¶
SetFloatField wraps the JNI SetFloatField function.
func (*Env) SetIntArrayRegion ¶
SetIntArrayRegion wraps the JNI SetIntArrayRegion function.
func (*Env) SetIntField ¶
SetIntField wraps the JNI SetIntField function.
func (*Env) SetLongArrayRegion ¶
SetLongArrayRegion wraps the JNI SetLongArrayRegion function.
func (*Env) SetLongField ¶
SetLongField wraps the JNI SetLongField function.
func (*Env) SetObjectArrayElement ¶
func (e *Env) SetObjectArrayElement(array *ObjectArray, index int32, value *Object) error
SetObjectArrayElement wraps the JNI SetObjectArrayElement function.
func (*Env) SetObjectField ¶
SetObjectField wraps the JNI SetObjectField function.
func (*Env) SetShortArrayRegion ¶
SetShortArrayRegion wraps the JNI SetShortArrayRegion function.
func (*Env) SetShortField ¶
SetShortField wraps the JNI SetShortField function.
func (*Env) SetStaticBooleanField ¶
SetStaticBooleanField wraps the JNI SetStaticBooleanField function.
func (*Env) SetStaticByteField ¶
SetStaticByteField wraps the JNI SetStaticByteField function.
func (*Env) SetStaticCharField ¶
SetStaticCharField wraps the JNI SetStaticCharField function.
func (*Env) SetStaticDoubleField ¶
SetStaticDoubleField wraps the JNI SetStaticDoubleField function.
func (*Env) SetStaticFloatField ¶
SetStaticFloatField wraps the JNI SetStaticFloatField function.
func (*Env) SetStaticIntField ¶
SetStaticIntField wraps the JNI SetStaticIntField function.
func (*Env) SetStaticLongField ¶
SetStaticLongField wraps the JNI SetStaticLongField function.
func (*Env) SetStaticObjectField ¶
SetStaticObjectField wraps the JNI SetStaticObjectField function.
func (*Env) SetStaticShortField ¶
SetStaticShortField wraps the JNI SetStaticShortField function.
func (*Env) ToReflectedField ¶
ToReflectedField wraps the JNI ToReflectedField function.
func (*Env) ToReflectedMethod ¶
ToReflectedMethod wraps the JNI ToReflectedMethod function.
func (*Env) UnregisterNatives ¶
UnregisterNatives wraps the JNI UnregisterNatives function.
type Error ¶
type Error int32
Error represents a JNI return code error (JNI_ERR, JNI_EDETACHED, etc.).
type FloatArray ¶
type FloatArray struct {
Array
}
FloatArray wraps the JNI jfloatArray reference type.
type GlobalRef ¶
type GlobalRef = Object
GlobalRef is an Object that has been promoted to a JNI global reference. It has the same layout as Object so that it can be cast to *Class or other reference types via unsafe.Pointer when needed.
type LongArray ¶
type LongArray struct {
Array
}
LongArray wraps the JNI jlongArray reference type.
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object wraps the JNI jobject reference type.
func ObjectFromRef ¶
ObjectFromRef wraps a raw JNI jobject reference in an Object. The caller is responsible for ensuring the reference is valid.
type ObjectArray ¶
type ObjectArray struct {
Array
}
ObjectArray wraps the JNI jobjectArray reference type.
type ObjectRefType ¶
ObjectRefType represents the type of a JNI object reference.
type ProxyHandler ¶
ProxyHandler is a Go function that handles method invocations on a Java interface proxy. It receives the method name and arguments, and returns a result object (or nil for void methods) and an optional error.
type ProxyHandlerFull ¶
type ProxyHandlerFull func(env *Env, method *Object, methodName string, args []*Object) (*Object, error)
ProxyHandlerFull is like ProxyHandler but also receives the java.lang.reflect.Method object for return type inspection (e.g. detecting void callbacks via method.getReturnType()).
type ShortArray ¶
type ShortArray struct {
Array
}
ShortArray wraps the JNI jshortArray reference type.
type Throwable ¶
type Throwable struct {
Object
}
Throwable wraps the JNI jthrowable reference type.
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
VM wraps a JNI JavaVM pointer. It is process-global and thread-safe.
func (*VM) AttachCurrentThread ¶
AttachCurrentThread attaches the current OS thread to the JVM and returns a valid JNIEnv pointer.
func (*VM) Do ¶
Do pins the calling goroutine to an OS thread, attaches it to the JVM (if not already attached), executes fn with a valid *Env, and detaches if it was the one that attached.
This is the primary entry point for all JNI operations. It ensures:
- The goroutine stays on the same OS thread for the duration of fn.
- The OS thread has a valid JNIEnv (attaching if necessary).
- The thread is detached after fn returns (only if Do attached it).
It is safe to nest Do calls. An inner Do finds the thread already attached via GetEnv and neither re-attaches nor detaches. Go reference-counts LockOSThread/UnlockOSThread, so nesting is safe.
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value wraps a JNI jvalue union. Use the typed constructors (IntValue, LongValue, ObjectValue, etc.) to create values for method call arguments.
func DoubleValue ¶
DoubleValue creates a Value holding a float64.
func ObjectValue ¶
ObjectValue creates a Value holding an Object reference.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package accounts provides Go bindings for .
|
Package accounts provides Go bindings for . |
|
Package app provides Go bindings for .
|
Package app provides Go bindings for . |
|
admin
Package admin provides Go bindings for .
|
Package admin provides Go bindings for . |
|
alarm
Package alarm provides Go bindings for .
|
Package alarm provides Go bindings for . |
|
blob
Package blob provides Go bindings for .
|
Package blob provides Go bindings for . |
|
download
Package download provides Go bindings for .
|
Package download provides Go bindings for . |
|
job
Package job provides Go bindings for .
|
Package job provides Go bindings for . |
|
notification
Package notification provides Go bindings for .
|
Package notification provides Go bindings for . |
|
role
Package role provides Go bindings for .
|
Package role provides Go bindings for . |
|
usage
Package usage provides Go bindings for .
|
Package usage provides Go bindings for . |
|
Package bluetooth provides Go bindings for .
|
Package bluetooth provides Go bindings for . |
|
le
Package le provides Go bindings for .
|
Package le provides Go bindings for . |
|
Desktop builds require CGO_CFLAGS and CGO_LDFLAGS pointing to a JDK:
|
Desktop builds require CGO_CFLAGS and CGO_LDFLAGS pointing to a JDK: |
|
Package companion provides Go bindings for .
|
Package companion provides Go bindings for . |
|
Package content provides Go bindings for .
|
Package content provides Go bindings for . |
|
clipboard
Package clipboard provides Go bindings for .
|
Package clipboard provides Go bindings for . |
|
permission
Package permission provides Go bindings for .
|
Package permission provides Go bindings for . |
|
pm
Package pm provides Go bindings for .
|
Package pm provides Go bindings for . |
|
preferences
Package preferences provides Go bindings for .
|
Package preferences provides Go bindings for . |
|
resolver
Package resolver provides Go bindings for .
|
Package resolver provides Go bindings for . |
|
Package credentials provides Go bindings for .
|
Package credentials provides Go bindings for . |
|
graphics
|
|
|
pdf
Package pdf provides Go bindings for .
|
Package pdf provides Go bindings for . |
|
hardware
|
|
|
biometric
Package biometric provides Go bindings for .
|
Package biometric provides Go bindings for . |
|
camera
Package camera provides Go bindings for .
|
Package camera provides Go bindings for . |
|
ir
Package ir provides Go bindings for .
|
Package ir provides Go bindings for . |
|
lights
Package lights provides Go bindings for .
|
Package lights provides Go bindings for . |
|
usb
Package usb provides Go bindings for .
|
Package usb provides Go bindings for . |
|
health
|
|
|
connect
Package connect provides Go bindings for .
|
Package connect provides Go bindings for . |
|
internal
|
|
|
jnierr
Package jnierr provides JNI exception-to-Go-error conversion.
|
Package jnierr provides JNI exception-to-Go-error conversion. |
|
testjvm
Package testjvm provides a helper to create a JVM for testing.
|
Package testjvm provides a helper to create a JVM for testing. |
|
Package location provides Go bindings for .
|
Package location provides Go bindings for . |
|
altitude
Package altitude provides Go bindings for .
|
Package altitude provides Go bindings for . |
|
media
|
|
|
audiomanager
Package audiomanager provides Go bindings for .
|
Package audiomanager provides Go bindings for . |
|
audiorecord
Package audiorecord provides Go bindings for .
|
Package audiorecord provides Go bindings for . |
|
player
Package player provides Go bindings for .
|
Package player provides Go bindings for . |
|
projection
Package projection provides Go bindings for .
|
Package projection provides Go bindings for . |
|
recorder
Package recorder provides Go bindings for .
|
Package recorder provides Go bindings for . |
|
ringtone
Package ringtone provides Go bindings for .
|
Package ringtone provides Go bindings for . |
|
session
Package session provides Go bindings for .
|
Package session provides Go bindings for . |
|
Package net provides Go bindings for .
|
Package net provides Go bindings for . |
|
nsd
Package nsd provides Go bindings for .
|
Package nsd provides Go bindings for . |
|
vpn
Package vpn provides Go bindings for .
|
Package vpn provides Go bindings for . |
|
wifi
Package wifi provides Go bindings for .
|
Package wifi provides Go bindings for . |
|
wifi/p2p
Package p2p provides Go bindings for .
|
Package p2p provides Go bindings for . |
|
wifi/rtt
Package rtt provides Go bindings for .
|
Package rtt provides Go bindings for . |
|
Package nfc provides Go bindings for .
|
Package nfc provides Go bindings for . |
|
os
|
|
|
battery
Package battery provides Go bindings for .
|
Package battery provides Go bindings for . |
|
build
Package build provides Go bindings for .
|
Package build provides Go bindings for . |
|
environment
Package environment provides Go bindings for .
|
Package environment provides Go bindings for . |
|
keyguard
Package keyguard provides Go bindings for .
|
Package keyguard provides Go bindings for . |
|
power
Package power provides Go bindings for .
|
Package power provides Go bindings for . |
|
storage
Package storage provides Go bindings for .
|
Package storage provides Go bindings for . |
|
vibrator
Package vibrator provides Go bindings for .
|
Package vibrator provides Go bindings for . |
|
Package print provides Go bindings for .
|
Package print provides Go bindings for . |
|
provider
|
|
|
calendar
Package calendar provides Go bindings for .
|
Package calendar provides Go bindings for . |
|
contacts
Package contacts provides Go bindings for .
|
Package contacts provides Go bindings for . |
|
documents
Package documents provides Go bindings for .
|
Package documents provides Go bindings for . |
|
media
Package media provides Go bindings for .
|
Package media provides Go bindings for . |
|
settings
Package settings provides Go bindings for .
|
Package settings provides Go bindings for . |
|
se
|
|
|
omapi
Package omapi provides Go bindings for .
|
Package omapi provides Go bindings for . |
|
security
|
|
|
keystore
Package keystore provides Go bindings for .
|
Package keystore provides Go bindings for . |
|
Package speech provides Go bindings for .
|
Package speech provides Go bindings for . |
|
Package telecom provides Go bindings for .
|
Package telecom provides Go bindings for . |
|
Package telephony provides Go bindings for .
|
Package telephony provides Go bindings for . |
|
tools
|
|
|
cmd/cligen
command
|
|
|
cmd/grpcgen
command
|
|
|
cmd/javagen
command
|
|
|
cmd/jnigen
command
|
|
|
cmd/protogen
command
|
|
|
cmd/specgen
command
|
|
|
pkg/cligen
Package cligen generates cobra CLI commands from Java API YAML specs.
|
Package cligen generates cobra CLI commands from Java API YAML specs. |
|
pkg/grpcgen
Package grpcgen generates idiomatic Go server and client wrappers for gRPC services defined in proto files.
|
Package grpcgen generates idiomatic Go server and client wrappers for gRPC services defined in proto files. |
|
pkg/protoscan
Package protoscan reads compiled proto Go stubs to resolve actual Go names for services, RPCs, and messages.
|
Package protoscan reads compiled proto Go stubs to resolve actual Go names for services, RPCs, and messages. |
|
pkg/specgen
Package specgen generates Java API YAML specs from .class files using javap.
|
Package specgen generates Java API YAML specs from .class files using javap. |
|
view
|
|
|
display
Package display provides Go bindings for .
|
Package display provides Go bindings for . |
|
inputmethod
Package inputmethod provides Go bindings for .
|
Package inputmethod provides Go bindings for . |
|
widget
|
|
|
toast
Package toast provides Go bindings for .
|
Package toast provides Go bindings for . |