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

Function makeMethodInvoker

valdi_core/src/valdi_core/jni/JavaMethod.cpp:162–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160
161template<typename T>
162static AnyJavaMethod::Invoker makeMethodInvoker(bool isStatic) {
163 if (isStatic) {
164 return [](JNIEnv& env, jmethodID methodId, jobject obj, jvalue* args) -> JavaValue {
165 return toJavaValue(JavaEnv(), callJniStaticMethod<T>(env, methodId, reinterpret_cast<jclass>(obj), args));
166 };
167 } else {
168 return [](JNIEnv& env, jmethodID methodId, jobject obj, jvalue* args) -> JavaValue {
169 return toJavaValue(JavaEnv(), callJniMethod<T>(env, methodId, obj, args));
170 };
171 }
172}
173
174AnyJavaMethod::Invoker AnyJavaMethod::getInvokerForMethodType(bool isStatic, std::optional<JavaValueType> returnType) {
175 if (!returnType) {

Callers

nothing calls this directly

Calls 2

toJavaValueFunction · 0.85
JavaEnvClass · 0.70

Tested by

no test coverage detected