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

Method call

valdi_core/src/valdi_core/jni/JavaMethod.hpp:172–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170 JavaStaticMethod() = default;
171
172 Ret call(jclass cls, const T&... args) const {
173 const int ksize = sizeof...(args);
174 JavaValue parameters[ksize] = {toJavaValue(getEnv(), args)...};
175
176 jvalue outParameters[ksize];
177 for (int i = 0; i < ksize; i++) {
178 outParameters[i] = parameters[i].getValue();
179 }
180
181 return JavaEnv::accessEnvRet(
182 [&](JNIEnv& env) -> auto { return callJniStaticMethod<Ret>(env, getMethodId(), cls, &outParameters[0]); });
183 }
184};
185
186} // namespace ValdiAndroid

Callers

nothing calls this directly

Calls 3

toJavaValueFunction · 0.85
getValueMethod · 0.65
getEnvFunction · 0.50

Tested by

no test coverage detected