Versions in this module Expand all Collapse all v0 v0.0.4 Mar 11, 2023 v0.0.0 Mar 11, 2023 Changes in this version + const Array + const Boolean + const Byte + const Char + const DEFAULT_VERSION + const Double + const Float + const Int + const JLI_LOAD_ENV — darwin/amd64 + const JLI_LOAD_FORCE — darwin/amd64 + const JLI_LOAD_YES — darwin/amd64 + const JNI_VERSION_10 + const JNI_VERSION_1_2 + const JNI_VERSION_1_4 + const JNI_VERSION_1_6 + const JNI_VERSION_1_8 + const JNI_VERSION_9 + const Long + const Object + const Short + const Void + func AttemptToFindJVMLibPath() string + func CreateJVM(jvmInitArgs *JVMInitArgs) (*JVM, *Env, error) + func LoadJVMLib(jvmLibPath string) error — darwin/amd64, linux/amd64, windows/amd64 + func RunCFRLoop() — darwin/amd64 + func UseJVM(pvm unsafe.Pointer, penv unsafe.Pointer, thiz unsafe.Pointer) (*JVM, *Env) + type ArrayRef struct + func NewArrayRef(t Type) *ArrayRef + func (a *ArrayRef) ConvertToGo(obj *ObjectRef) error + func (a *ArrayRef) GetType() Type + type ByteArray struct + func (b *ByteArray) CopyBytes(env *Env) []byte + func (b *ByteArray) GetCritical(env *Env) []byte + func (b *ByteArray) GetObject() *ObjectRef + func (b *ByteArray) ReleaseCritical(env *Env, bytes []byte) + func (b *ByteArray) SetObject(o *ObjectRef) + type ClassInfoGetter interface + GetClassName func() string + IsArray func() bool + type Env struct + ExceptionHandler ExceptionHandler + func WrapEnv(envPtr unsafe.Pointer) *Env + func (j *Env) CallStaticMethod(className string, methodName string, dest interface{}, args ...interface{}) error + func (j *Env) DeleteGlobalRef(o *ObjectRef) + func (j *Env) DeleteLocalRef(o *ObjectRef) + func (j *Env) EnsureLocalCapacity(capacity int32) error + func (j *Env) FindClass(className string) (*ObjectRef, error) + func (j *Env) FromObjectArray(objRef *ObjectRef) []*ObjectRef + func (j *Env) GetJVM() (*JVM, error) + func (j *Env) GetStaticField(className string, fieldName string, dest interface{}) error + func (j *Env) GetUTF8String() *ObjectRef + func (j *Env) NewByteArray(n int) *ByteArray + func (j *Env) NewByteArrayFromObject(o *ObjectRef) *ByteArray + func (j *Env) NewByteArrayFromSlice(src []byte) *ByteArray + func (j *Env) NewGlobalRef(o *ObjectRef) *ObjectRef + func (j *Env) NewObject(className string, args ...interface{}) (*ObjectRef, error) + func (j *Env) PopLocalFrame(result *ObjectRef) *ObjectRef + func (j *Env) PrecalculateSignature(sig string) + func (j *Env) PushLocalFrame(capacity int32) error + func (j *Env) RegisterNative(className, methodName string, returnType TypeSpec, params []interface{}, ...) error + func (j *Env) SetStaticField(className string, fieldName string, value interface{}) error + func (j *Env) ToObjectArray(objRefs []*ObjectRef, className string) (arrayRef *ObjectRef) + type ExceptionHandler interface + CatchException func(env *Env, exception *ObjectRef) error + var DefaultExceptionHandler = DescribeExceptionHandler + var DescribeExceptionHandler ExceptionHandler = ExceptionHandlerFunc(func(env *Env, exception *ObjectRef) error { ... }) + var ThrowableErrorExceptionHandler ExceptionHandler = ExceptionHandlerFunc(func(env *Env, exception *ObjectRef) error { ... }) + var ThrowableToStringExceptionHandler ExceptionHandler = ExceptionHandlerFunc(func(env *Env, exception *ObjectRef) error { ... }) + type ExceptionHandlerFunc func(env *Env, exception *ObjectRef) error + func (f ExceptionHandlerFunc) CatchException(env *Env, exception *ObjectRef) error + type JVM struct + func (j *JVM) AttachCurrentThread() *Env + func (j *JVM) Destroy() error + func (j *JVM) DetachCurrentThread() error + type JVMInitArgs struct + func NewJVMInitArgs(ignoreUnrecognizedArgs bool, includeDefaultArgs bool, version int, ...) *JVMInitArgs + type ObjectArrayType string + type ObjectRef struct + func NewObjectArrayRef(className string) *ObjectRef + func NewObjectRef(className string) *ObjectRef + func WrapJObject(jobj uintptr, className string, isArray bool) *ObjectRef + func (o *ObjectRef) CallMethod(env *Env, methodName string, dest interface{}, args ...interface{}) error + func (o *ObjectRef) CallNonvirtualMethod(env *Env, className string, methodName string, dest interface{}, ...) error + func (o *ObjectRef) Cast(className string) *ObjectRef + func (o *ObjectRef) GetClassName() string + func (o *ObjectRef) GetField(env *Env, fieldName string, dest interface{}) error + func (o *ObjectRef) IsArray() bool + func (o *ObjectRef) IsInstanceOf(env *Env, className string) (bool, error) + func (o *ObjectRef) IsNil() bool + func (o *ObjectRef) JObject() jobject + func (o *ObjectRef) SetField(env *Env, fieldName string, value interface{}) error + type ObjectType string + type StackTraceElement struct + AsString string + ClassName string + FileName string + IsNativeMethod bool + LineNumber int + MethodName string + func NewStackTraceElementFromObject(env *Env, stackTraceElement *ObjectRef) (*StackTraceElement, error) + func (el StackTraceElement) String() string + type ThrowableError struct + AsString string + Cause *ThrowableError + ClassName string + LocalizedMessage string + Message string + StackTrace []StackTraceElement + func NewThrowableErrorFromObject(env *Env, throwable *ObjectRef) (*ThrowableError, error) + func (e ThrowableError) Error() string + func (e ThrowableError) String() string + type ToGoConverter interface + ConvertToGo func(obj *ObjectRef) error + type ToJavaConverter interface + ConvertToJava func() (*ObjectRef, error) + type Type uint32 + type TypeGetter interface + GetType func() Type + type TypeSpec interface