Home | History | Annotate | Download | only in native

Lines Matching defs:env

35     scoped_local_ref(C_JNIEnv* env, T localRef = NULL)
36 : mEnv(env), mLocalRef(localRef)
64 static jclass findClass(C_JNIEnv* env, const char* className) {
65 JNIEnv* e = reinterpret_cast<JNIEnv*>(env);
66 return (*env)->FindClass(e, className);
69 extern "C" int jniRegisterNativeMethods(C_JNIEnv* env, const char* className,
72 JNIEnv* e = reinterpret_cast<JNIEnv*>(env);
76 scoped_local_ref<jclass> c(env, findClass(env, className));
83 if ((*env)->RegisterNatives(e, c.get(), gMethods, numMethods) < 0) {
93 JNIEnv* env = reinterpret_cast<JNIEnv*>(c_env);
94 jclass exceptionClass = env->FindClass(className);
102 if (env->ThrowNew(exceptionClass, msg) != JNI_OK) {
108 env->DeleteLocalRef(exceptionClass);
112 int jniThrowExceptionFmt(C_JNIEnv* env, const char* className, const char* fmt, va_list args) {
115 return jniThrowException(env, className, msgBuf);
118 int jniThrowNullPointerException(C_JNIEnv* env, const char* msg) {
119 return jniThrowException(env, "java/lang/NullPointerException", msg);
122 int jniThrowRuntimeException(C_JNIEnv* env, const char* msg) {
123 return jniThrowException(env, "java/lang/RuntimeException", msg);
126 int jniThrowIOException(C_JNIEnv* env, int errnum) {
129 return jniThrowException(env, "java/io/IOException", message);
149 int jniGetFDFromFileDescriptor(C_JNIEnv* env, jobject fileDescriptor) {
150 JNIEnv* e = reinterpret_cast<JNIEnv*>(env);
151 scoped_local_ref<jclass> localClass(env, e->FindClass("java/io/FileDescriptor"));
154 return (*env)->GetIntField(e, fileDescriptor, fid);