Lines Matching refs:jni_cache_
38 : jni_cache_(jni_cache) {} in UniLibBase()
86 jni_cache_->ConvertToJavaString(text)); in Length()
88 JNIEnv* jenv = jni_cache_->GetEnv(); in Length()
91 jni_cache_->string_length)); in Length()
94 jni_cache_->string_code_point_count, 0, in Length()
107 if (!jni_cache_) { in ParseDouble()
142 new UniLibBase::RegexPattern(jni_cache_.get(), regex, /*lazy=*/false)); in CreateRegexPattern()
148 new UniLibBase::RegexPattern(jni_cache_.get(), regex, /*lazy=*/true)); in CreateLazyRegexPattern()
153 : jni_cache_(jni_cache), in RegexPattern()
169 if (jni_cache_) { in LockedInitializeIfNotAlready()
170 JNIEnv* jenv = jni_cache_->GetEnv(); in LockedInitializeIfNotAlready()
173 jni_cache_->ConvertToJavaString(pattern_text_)); in LockedInitializeIfNotAlready()
176 jenv, jni_cache_->pattern_class.get(), in LockedInitializeIfNotAlready()
177 jni_cache_->pattern_compile, regex_java.get())); in LockedInitializeIfNotAlready()
178 pattern_ = MakeGlobalRef(pattern.get(), jenv, jni_cache_->jvm); in LockedInitializeIfNotAlready()
200 if (jni_cache_) { in Matcher()
201 JNIEnv* env = jni_cache_->GetEnv(); in Matcher()
203 jni_cache_->ConvertToJavaString(context); in Matcher()
209 jni_cache_->pattern_matcher, in Matcher()
211 if (jni_cache_->ExceptionCheckAndClear() || !status_or_matcher.ok() || in Matcher()
216 jni_cache_, in Matcher()
218 jni_cache_->jvm), in Matcher()
220 jni_cache_->jvm))); in Matcher()
225 new RegexMatcher(jni_cache_, {}, {})); in Matcher()
232 : jni_cache_(jni_cache), in RegexMatcher()
237 if (jni_cache_) { in Matches()
239 const bool result = jni_cache_->GetEnv()->CallBooleanMethod( in Matches()
240 matcher_.get(), jni_cache_->matcher_matches); in Matches()
241 if (jni_cache_->ExceptionCheckAndClear()) { in Matches()
255 jni_cache_->GetEnv()->CallObjectMethod(matcher_.get(), in ApproximatelyMatches()
256 jni_cache_->matcher_reset); in ApproximatelyMatches()
257 if (jni_cache_->ExceptionCheckAndClear()) { in ApproximatelyMatches()
266 const int found_start = jni_cache_->GetEnv()->CallIntMethod( in ApproximatelyMatches()
267 matcher_.get(), jni_cache_->matcher_start_idx, 0); in ApproximatelyMatches()
268 if (jni_cache_->ExceptionCheckAndClear()) { in ApproximatelyMatches()
273 const int found_end = jni_cache_->GetEnv()->CallIntMethod( in ApproximatelyMatches()
274 matcher_.get(), jni_cache_->matcher_end_idx, 0); in ApproximatelyMatches()
275 if (jni_cache_->ExceptionCheckAndClear()) { in ApproximatelyMatches()
280 int context_length_bmp = jni_cache_->GetEnv()->CallIntMethod( in ApproximatelyMatches()
281 text_.get(), jni_cache_->string_length); in ApproximatelyMatches()
282 if (jni_cache_->ExceptionCheckAndClear()) { in ApproximatelyMatches()
299 const int find_offset = jni_cache_->GetEnv()->CallIntMethod( in UpdateLastFindOffset()
300 matcher_.get(), jni_cache_->matcher_start_idx, 0); in UpdateLastFindOffset()
301 if (jni_cache_->ExceptionCheckAndClear()) { in UpdateLastFindOffset()
305 const int codepoint_count = jni_cache_->GetEnv()->CallIntMethod( in UpdateLastFindOffset()
306 text_.get(), jni_cache_->string_code_point_count, last_find_offset_, in UpdateLastFindOffset()
308 if (jni_cache_->ExceptionCheckAndClear()) { in UpdateLastFindOffset()
320 if (jni_cache_) { in Find()
321 const bool result = jni_cache_->GetEnv()->CallBooleanMethod( in Find()
322 matcher_.get(), jni_cache_->matcher_find); in Find()
323 if (jni_cache_->ExceptionCheckAndClear()) { in Find()
342 if (jni_cache_) { in Start()
350 const int java_index = jni_cache_->GetEnv()->CallIntMethod( in Start()
351 matcher_.get(), jni_cache_->matcher_start_idx, group_idx); in Start()
352 if (jni_cache_->ExceptionCheckAndClear()) { in Start()
362 const int unicode_index = jni_cache_->GetEnv()->CallIntMethod( in Start()
363 text_.get(), jni_cache_->string_code_point_count, last_find_offset_, in Start()
365 if (jni_cache_->ExceptionCheckAndClear()) { in Start()
382 if (jni_cache_) { in End()
390 const int java_index = jni_cache_->GetEnv()->CallIntMethod( in End()
391 matcher_.get(), jni_cache_->matcher_end_idx, group_idx); in End()
392 if (jni_cache_->ExceptionCheckAndClear()) { in End()
402 const int unicode_index = jni_cache_->GetEnv()->CallIntMethod( in End()
403 text_.get(), jni_cache_->string_code_point_count, last_find_offset_, in End()
405 if (jni_cache_->ExceptionCheckAndClear()) { in End()
418 if (jni_cache_) { in Group()
419 JNIEnv* jenv = jni_cache_->GetEnv(); in Group()
422 jni_cache_->matcher_group); in Group()
424 if (jni_cache_->ExceptionCheckAndClear() || !status_or_java_result.ok() || in Group()
445 if (jni_cache_) { in Group()
446 JNIEnv* jenv = jni_cache_->GetEnv(); in Group()
450 jenv, matcher_.get(), jni_cache_->matcher_group_idx, group_idx); in Group()
451 if (jni_cache_->ExceptionCheckAndClear() || !status_or_java_result.ok()) { in Group()
483 : jni_cache_(jni_cache), in BreakIterator()
488 if (jni_cache_) { in BreakIterator()
489 JNIEnv* jenv = jni_cache_->GetEnv(); in BreakIterator()
491 jni_cache_->ConvertToJavaString(text); in BreakIterator()
520 if (jni_cache_) { in Next()
521 const int break_index = jni_cache_->GetEnv()->CallIntMethod( in Next()
522 iterator_.get(), jni_cache_->breakiterator_next); in Next()
523 if (jni_cache_->ExceptionCheckAndClear() || in Next()
528 const int token_unicode_length = jni_cache_->GetEnv()->CallIntMethod( in Next()
529 text_.get(), jni_cache_->string_code_point_count, last_break_index_, in Next()
531 if (jni_cache_->ExceptionCheckAndClear()) { in Next()
544 new UniLibBase::BreakIterator(jni_cache_.get(), text)); in CreateBreakIterator()