MCPcopy Create free account
hub / github.com/NativeScript/android / Init

Method Init

test-app/runtime/src/main/cpp/MethodCache.cpp:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17using namespace tns;
18
19void MethodCache::Init() {
20 JEnv env;
21
22 RUNTIME_CLASS = env.FindClass("com/tns/Runtime");
23 assert(RUNTIME_CLASS != nullptr);
24
25 RESOLVE_METHOD_OVERLOAD_METHOD_ID = env.GetMethodID(RUNTIME_CLASS, "resolveMethodOverload", "(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;");
26 assert(RESOLVE_METHOD_OVERLOAD_METHOD_ID != nullptr);
27
28 RESOLVE_CONSTRUCTOR_SIGNATURE_ID = env.GetMethodID(RUNTIME_CLASS, "resolveConstructorSignature", "(Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/String;");
29 assert(RESOLVE_CONSTRUCTOR_SIGNATURE_ID != nullptr);
30}
31
32MethodCache::CacheMethodInfo MethodCache::ResolveMethodSignature(const string& className, const string& methodName, const FunctionCallbackInfo<Value>& args, bool isStatic) {
33 CacheMethodInfo method_info;

Callers

nothing calls this directly

Calls 2

GetMethodIDMethod · 0.80
FindClassMethod · 0.45

Tested by

no test coverage detected