MCPcopy Create free account
hub / github.com/Snapchat/Valdi / resolveClassName

Function resolveClassName

valdi_core/src/valdi_core/jni/JavaClass.cpp:18–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16#ifdef VALDI_DEBUG_JNI_CALLS
17
18Valdi::StringBox resolveClassName(JavaEnv env, jclass cls) {
19 static jmethodID classNameMethodId = ::djinni::jniGetMethodID(cls, "getName", "()Ljava/lang/String;");
20 auto value = ::djinni::LocalRef<jobject>(env.getUnsafeEnv()->CallObjectMethod(cls, classNameMethodId));
21
22 return ValdiAndroid::toInternedString(env, reinterpret_cast<jstring>(value.get()));
23}
24
25#endif
26

Callers 1

JavaClassMethod · 0.85

Calls 4

jniGetMethodIDFunction · 0.85
toInternedStringFunction · 0.85
getUnsafeEnvMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected