Lines Matching defs:env_
373 : env_(env),
393 JNIEnv* const env_;
413 jclass c = env_->FindClass(class_name);
414 if (env_->ExceptionCheck()) {
415 env_->ExceptionDescribe();
416 env_->FatalError(__FUNCTION__);
418 CHECK(!env_->ExceptionCheck());
425 env_->GetMethodID(c, method_name, "()V") :
426 env_->GetStaticMethodID(c, method_name, "()V"));
427 if (env_->ExceptionCheck()) {
428 env_->ExceptionDescribe();
429 env_->FatalError(__FUNCTION__);
436 jobject o = env_->NewObject(c, m);
437 if (env_->ExceptionCheck()) {
438 env_->ExceptionDescribe();
439 env_->FatalError(__FUNCTION__);
447 env_->CallNonvirtualVoidMethod(o, c, m);
448 bool exception_check = env_->ExceptionCheck();
452 env_->FatalError("Expected NullPointerException with null jclass");
454 env_->ExceptionClear();
457 env_->ExceptionDescribe();
458 env_->FatalError(test_case);
464 jfieldID m = env_->GetFieldID(c, field_name, "Z");
465 if (env_->ExceptionCheck()) {
466 env_->ExceptionDescribe();
467 env_->FatalError(__FUNCTION__);
474 jboolean b = env_
475 if (env_->ExceptionCheck()) {
476 env_->ExceptionDescribe();
477 env_->FatalError(__FUNCTION__);
510 CHECK(env_->IsInstanceOf(super_super, super_));
511 CHECK(!env_->IsInstanceOf(super_super, sub_));
515 CHECK(env_->IsInstanceOf(super_sub, super_));
516 CHECK(!env_->IsInstanceOf(super_sub, sub_));
520 CHECK(env_->IsInstanceOf(sub_super, super_));
521 CHECK(env_->IsInstanceOf(sub_super, sub_));
523 CHECK(env_->IsInstanceOf(sub_sub, super_));
524 CHECK(env_->IsInstanceOf(sub_sub, sub_));
665 : env_(env), concrete_class_(env_->FindClass("ConcreteClass")) {
666 CHECK(!env_->ExceptionCheck());
688 jmethodID new_method = env_->GetMethodID(concrete_class_, "<init>", "()V");
689 jobject obj = env_->NewObject(concrete_class_, new_method);
690 CHECK(!env_->ExceptionCheck());
692 jclass decl_class = env_->FindClass(declaring_class);
693 CHECK(!env_->ExceptionCheck());
696 jmethodID method_id = env_->GetMethodID(decl_class, method, "()V");
697 CHECK(!env_->ExceptionCheck());
699 env_->CallVoidMethod(obj, method_id);
700 if (env_->ExceptionCheck()) {
701 jthrowable thrown = env_->ExceptionOccurred();
702 env_->ExceptionClear();
703 jmethodID to_string = env_->GetMethodID(
704 env_->FindClass("java/lang/Object"), "toString", "()Ljava/lang/String;");
705 jstring exception_string = (jstring) env_->CallObjectMethod(thrown, to_string);
706 CHECK(!env_->ExceptionCheck());
707 const char* exception_string_utf8 = env_->GetStringUTFChars(exception_string, nullptr);
708 CHECK(!env_->ExceptionCheck());
711 env_->ReleaseStringUTFChars(exception_string, exception_string_utf8);
716 JNIEnv* env_;