Lines Matching defs:env_
83 env_ = Thread::Current()->GetJniEnv();
84 jklass_ = env_->FindClass("MyClassNatives");
88 jmethod_ = env_->GetStaticMethodID(jklass_, method_name, method_sig);
90 jmethod_ = env_->GetMethodID(jklass_, method_name, method_sig);
96 ASSERT_EQ(JNI_OK, env_->RegisterNatives(jklass_, methods, 1))
99 env_->UnregisterNatives(jklass_);
102 jmethodID constructor = env_->GetMethodID(jklass_, "<init>", "()V");
103 jobj_ = env_->NewObject(jklass_, constructor);
114 JNIEnv* env_;
140 env_->CallNonvirtualVoidMethod(jobj_, jklass_, jmethod_);
142 env_->CallNonvirtualVoidMethod(jobj_, jklass_, jmethod_);
157 jint result = env_->CallNonvirtualIntMethod(jobj_, jklass_, jmethod_, 24);
172 jint result = env_->CallStaticIntMethod(jklass_, jmethod_, 42);
194 jint result = env_->CallNonvirtualIntMethod(jobj_, jklass_, jmethod_, 42);
197 result = env_->CallNonvirtualIntMethod(jobj_, jklass_, jmethod_, 0xCAFED00D);
220 jint result = env_->CallNonvirtualIntMethod(jobj_, jklass_, jmethod_, 99, 10);
223 result = env_->CallNonvirtualIntMethod(jobj_, jklass_, jmethod_, 0xCAFEBABE,
249 jlong result = env_->CallNonvirtualLongMethod(jobj_, jklass_, jmethod_, a, b);
252 result = env_->CallNonvirtualLongMethod(jobj_, jklass_, jmethod_, b, a);
275 jdouble result = env_->CallNonvirtualDoubleMethod(jobj_, jklass_, jmethod_,
281 result = env_->CallNonvirtualDoubleMethod(jobj_, jklass_, jmethod_, a, b);
306 jlong result = env_->CallNonvirtualLongMethod(jobj_, jklass_, jmethod_, a, b);
338 jobject result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, 0, NULL, NULL);
339 EXPECT_TRUE(env_->IsSameObject(jobj_, result));
342 result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, 0, NULL, jklass_);
343 EXPECT_TRUE(env_->IsSameObject(jobj_, result));
345 result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, 1, NULL, jklass_);
346 EXPECT_TRUE(env_->IsSameObject(NULL, result));
348 result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, 2, NULL, jklass_);
349 EXPECT_TRUE(env_->IsSameObject(jklass_, result));
352 result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, 0, jklass_, NULL);
353 EXPECT_TRUE(env_->IsSameObject(jobj_, result));
355 result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, 1, jklass_, NULL);
356 EXPECT_TRUE(env_->IsSameObject(jklass_, result));
358 result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, 2, jklass_, NULL);
359 EXPECT_TRUE(env_->IsSameObject(NULL, result));
381 jint result = env_->CallStaticIntMethod(jklass_, jmethod_, 20, 30);
404 jdouble result = env_->CallStaticDoubleMethod(jklass_, jmethod_, 99.0, 10.0);
409 result = env_->CallStaticDoubleMethod(jklass_, jmethod_, a, b);
442 jobject result = env_->CallStaticObjectMethod(jklass_, jmethod_, 0, NULL, NULL);
443 EXPECT_TRUE(env_->IsSameObject(jklass_, result));
446 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 0, NULL, jobj_);
447 EXPECT_TRUE(env_->IsSameObject(jklass_, result));
449 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 1, NULL, jobj_);
450 EXPECT_TRUE(env_->IsSameObject(NULL, result));
452 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 2, NULL, jobj_);
453 EXPECT_TRUE(env_->IsSameObject(jobj_, result));
456 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 0, jobj_, NULL);
457 EXPECT_TRUE(env_->IsSameObject(jklass_, result));
459 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 1, jobj_, NULL);
460 EXPECT_TRUE(env_->IsSameObject(jobj_, result));
462 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 2, jobj_, NULL);
463 EXPECT_TRUE(env_->IsSameObject(NULL, result));
493 jobject result = env_->CallStaticObjectMethod(jklass_, jmethod_, 0, NULL, NULL);
494 EXPECT_TRUE(env_->IsSameObject(jklass_, result));
497 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 0, NULL, jobj_);
498 EXPECT_TRUE(env_->IsSameObject(jklass_, result));
500 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 1, NULL, jobj_);
501 EXPECT_TRUE(env_->IsSameObject(NULL, result));
503 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 2, NULL, jobj_);
504 EXPECT_TRUE(env_->IsSameObject(jobj_, result));
507 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 0, jobj_, NULL);
508 EXPECT_TRUE(env_->IsSameObject(jklass_, result));
510 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 1, jobj_, NULL);
511 EXPECT_TRUE(env_->IsSameObject(jobj_, result));
513 result = env_->CallStaticObjectMethod(jklass_, jmethod_, 2, jobj_, NULL);
514 EXPECT_TRUE(env_->IsSameObject(NULL, result));
544 env_->CallNonvirtualVoidMethod(jobj_, jklass_, jmethod_);
549 ScopedLocalRef<jclass> jlre(env_, env_->FindClass("java/lang/RuntimeException"));
553 env_->CallNonvirtualVoidMethod(jobj_, jklass_, jmethod_);
555 EXPECT_TRUE(env_->ExceptionCheck() == JNI_TRUE);
556 ScopedLocalRef<jthrowable> exception(env_, env_->ExceptionOccurred());
557 env_->ExceptionClear();
558 EXPECT_TRUE(env_->IsInstanceOf(exception.get(), jlre.get()));
562 env_->CallNonvirtualVoidMethod(jobj_, jklass_, jmethod_);
608 jint result = env_->CallNonvirtualIntMethod(jobj_, jklass_, jmethod_, 10);
620 jobject result = env_->CallNonvirtualObjectMethod(jobj_, jklass_, jmethod_, jobj_);
621 EXPECT_EQ(JNILocalRefType, env_->GetObjectRefType(result));
622 EXPECT_TRUE(env_->IsSameObject(result, jobj_));
639 jint result = env_->CallIntMethod(jobj_, jmethod_, i);
657 env_->CallStaticVoidMethod(jklass_, jmethod_, jobj_, 1234, jklass_, 5678, 9876);
673 jboolean result = env_->CallBooleanMethod(jobj_, jmethod_, jobj_, 0x12345678ABCDEF88ll, 0xCAFEF00D, 0xEBADF00D);
690 jint result = env_->CallStaticIntMethod(jklass_, jmethod_, 0x12345678ABCDEF88ll, jobj_,
719 env_->CallObjectMethod(jobj_, jmethod_);
723 env_->CallVoidMethod(jobj_, jmethod_);
725 env_->CallStaticVoidMethod(jklass_, jmethod_);
737 env_->CallStaticObjectMethod(jklass_, jmethod_);
741 env_->CallStaticVoidMethod(jklass_, jmethod_);
743 env_->CallVoidMethod(jobj_, jmethod_);
762 env_->CallVoidMethod(jobj_, jmethod_, 123, env_->NewStringUTF("not a class!"));
773 env_->CallStaticVoidMethod(jklass_, jmethod_, 123, env_->NewStringUTF("not a class!"));