Lines Matching refs:jni_cache_
249 : jni_cache_(jni_cache) {} in UniLib()
324 if (jni_cache_) { in ParseInt32()
325 JNIEnv* env = jni_cache_->GetEnv(); in ParseInt32()
327 jni_cache_->ConvertToJavaString(text); in ParseInt32()
328 jint res = env->CallStaticIntMethod(jni_cache_->integer_class.get(), in ParseInt32()
329 jni_cache_->integer_parse_int, in ParseInt32()
331 if (jni_cache_->ExceptionCheckAndClear()) { in ParseInt32()
343 new UniLib::RegexPattern(jni_cache_.get(), regex, /*lazy=*/false)); in CreateRegexPattern()
349 new UniLib::RegexPattern(jni_cache_.get(), regex, /*lazy=*/true)); in CreateLazyRegexPattern()
354 : jni_cache_(jni_cache), in RegexPattern()
370 if (jni_cache_) { in LockedInitializeIfNotAlready()
371 JNIEnv* jenv = jni_cache_->GetEnv(); in LockedInitializeIfNotAlready()
373 jni_cache_->ConvertToJavaString(pattern_text_); in LockedInitializeIfNotAlready()
375 jni_cache_->pattern_class.get(), in LockedInitializeIfNotAlready()
376 jni_cache_->pattern_compile, regex_java.get()), in LockedInitializeIfNotAlready()
377 jenv, jni_cache_->jvm); in LockedInitializeIfNotAlready()
379 if (jni_cache_->ExceptionCheckAndClear() || pattern_ == nullptr) { in LockedInitializeIfNotAlready()
400 if (jni_cache_) { in Matcher()
401 JNIEnv* env = jni_cache_->GetEnv(); in Matcher()
403 jni_cache_->ConvertToJavaString(context).release(); in Matcher()
408 pattern_.get(), jni_cache_->pattern_matcher, context_java); in Matcher()
409 if (jni_cache_->ExceptionCheckAndClear() || !matcher) { in Matcher()
413 jni_cache_, MakeGlobalRef(matcher, env, jni_cache_->jvm), in Matcher()
414 MakeGlobalRef(context_java, env, jni_cache_->jvm))); in Matcher()
419 new RegexMatcher(jni_cache_, nullptr, nullptr)); in Matcher()
426 : jni_cache_(jni_cache), in RegexMatcher()
431 if (jni_cache_) { in Matches()
433 const bool result = jni_cache_->GetEnv()->CallBooleanMethod( in Matches()
434 matcher_.get(), jni_cache_->matcher_matches); in Matches()
435 if (jni_cache_->ExceptionCheckAndClear()) { in Matches()
449 jni_cache_->GetEnv()->CallObjectMethod(matcher_.get(), in ApproximatelyMatches()
450 jni_cache_->matcher_reset); in ApproximatelyMatches()
451 if (jni_cache_->ExceptionCheckAndClear()) { in ApproximatelyMatches()
460 const int found_start = jni_cache_->GetEnv()->CallIntMethod( in ApproximatelyMatches()
461 matcher_.get(), jni_cache_->matcher_start_idx, 0); in ApproximatelyMatches()
462 if (jni_cache_->ExceptionCheckAndClear()) { in ApproximatelyMatches()
467 const int found_end = jni_cache_->GetEnv()->CallIntMethod( in ApproximatelyMatches()
468 matcher_.get(), jni_cache_->matcher_end_idx, 0); in ApproximatelyMatches()
469 if (jni_cache_->ExceptionCheckAndClear()) { in ApproximatelyMatches()
474 int context_length_bmp = jni_cache_->GetEnv()->CallIntMethod( in ApproximatelyMatches()
475 text_.get(), jni_cache_->string_length); in ApproximatelyMatches()
476 if (jni_cache_->ExceptionCheckAndClear()) { in ApproximatelyMatches()
493 const int find_offset = jni_cache_->GetEnv()->CallIntMethod( in UpdateLastFindOffset()
494 matcher_.get(), jni_cache_->matcher_start_idx, 0); in UpdateLastFindOffset()
495 if (jni_cache_->ExceptionCheckAndClear()) { in UpdateLastFindOffset()
499 const int codepoint_count = jni_cache_->GetEnv()->CallIntMethod( in UpdateLastFindOffset()
500 text_.get(), jni_cache_->string_code_point_count, last_find_offset_, in UpdateLastFindOffset()
502 if (jni_cache_->ExceptionCheckAndClear()) { in UpdateLastFindOffset()
514 if (jni_cache_) { in Find()
515 const bool result = jni_cache_->GetEnv()->CallBooleanMethod( in Find()
516 matcher_.get(), jni_cache_->matcher_find); in Find()
517 if (jni_cache_->ExceptionCheckAndClear()) { in Find()
536 if (jni_cache_) { in Start()
544 const int java_index = jni_cache_->GetEnv()->CallIntMethod( in Start()
545 matcher_.get(), jni_cache_->matcher_start_idx, group_idx); in Start()
546 if (jni_cache_->ExceptionCheckAndClear()) { in Start()
556 const int unicode_index = jni_cache_->GetEnv()->CallIntMethod( in Start()
557 text_.get(), jni_cache_->string_code_point_count, last_find_offset_, in Start()
559 if (jni_cache_->ExceptionCheckAndClear()) { in Start()
576 if (jni_cache_) { in End()
584 const int java_index = jni_cache_->GetEnv()->CallIntMethod( in End()
585 matcher_.get(), jni_cache_->matcher_end_idx, group_idx); in End()
586 if (jni_cache_->ExceptionCheckAndClear()) { in End()
596 const int unicode_index = jni_cache_->GetEnv()->CallIntMethod( in End()
597 text_.get(), jni_cache_->string_code_point_count, last_find_offset_, in End()
599 if (jni_cache_->ExceptionCheckAndClear()) { in End()
612 if (jni_cache_) { in Group()
613 JNIEnv* jenv = jni_cache_->GetEnv(); in Group()
616 jenv->CallObjectMethod(matcher_.get(), jni_cache_->matcher_group)), in Group()
618 if (jni_cache_->ExceptionCheckAndClear() || !java_result) { in Group()
637 if (jni_cache_) { in Group()
638 JNIEnv* jenv = jni_cache_->GetEnv(); in Group()
641 matcher_.get(), jni_cache_->matcher_group_idx, group_idx)), in Group()
643 if (jni_cache_->ExceptionCheckAndClear()) { in Group()
674 : jni_cache_(jni_cache), in BreakIterator()
679 if (jni_cache_) { in BreakIterator()
680 JNIEnv* jenv = jni_cache_->GetEnv(); in BreakIterator()
681 text_ = MakeGlobalRef(jni_cache_->ConvertToJavaString(text).release(), jenv, in BreakIterator()
701 if (jni_cache_) { in Next()
702 const int break_index = jni_cache_->GetEnv()->CallIntMethod( in Next()
703 iterator_.get(), jni_cache_->breakiterator_next); in Next()
704 if (jni_cache_->ExceptionCheckAndClear() || in Next()
709 const int token_unicode_length = jni_cache_->GetEnv()->CallIntMethod( in Next()
710 text_.get(), jni_cache_->string_code_point_count, last_break_index_, in Next()
712 if (jni_cache_->ExceptionCheckAndClear()) { in Next()
725 new UniLib::BreakIterator(jni_cache_.get(), text)); in CreateBreakIterator()