Exemple #1
0
        public static JvmObjectReference FromHandle(JvmEnvironment environment, JNIEnvHandle jniEnv, jobject objectHandle, bool freeLocalReference)
        {
            if (objectHandle == jobject.Null)
            {
                return(null);
            }

            JvmNativeEnvironment nativeEnvironment = environment.GetNativeFunctionTable(jniEnv);

            return(new JvmObjectReference(environment, nativeEnvironment, objectHandle, freeLocalReference));
        }
        public static JvmThreadReference FromHandle(JvmEnvironment environment, JNIEnvHandle jniEnv, jthread threadHandle, bool freeLocalReference)
        {
            if (threadHandle == jthread.Null)
            {
                return(null);
            }

            JvmNativeEnvironment nativeEnvironment = environment.GetNativeFunctionTable(jniEnv);

            return(new JvmThreadReference(environment, nativeEnvironment, threadHandle, freeLocalReference));
        }
        public static JvmClassReference FromHandle(JvmEnvironment environment, JNIEnvHandle jniEnv, jclass classHandle, bool freeLocalReference)
        {
            if (classHandle == jclass.Null)
            {
                return(null);
            }

            JvmNativeEnvironment nativeEnvironment = environment.GetNativeFunctionTable(jniEnv);

            return(new JvmClassReference(environment, nativeEnvironment, classHandle, freeLocalReference));
        }