MCPcopy Create free account
hub / github.com/cuberite/cuberite / CallJavaFunction_Void_Void

Function CallJavaFunction_Void_Void

Android/jni/ToJava.h:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43static void CallJavaFunction_Void_Void( jobject a_Object, const std::string & a_FunctionName )
44{
45 //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "JNIEnv: %i Object: %i", g_CurrentJNIEnv, a_Object );
46 jclass cls = g_CurrentJNIEnv->GetObjectClass( a_Object );
47 //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jclass: %i", cls );
48 jmethodID mid = g_CurrentJNIEnv->GetMethodID( cls, a_FunctionName.c_str(), "()V"); // void a_FunctionName( String )
49 //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "jmethodID: %i", mid );
50 if (mid != 0)
51 {
52 //__android_log_print(ANDROID_LOG_ERROR,"MCServer", "Going to call right NOW! %s", a_FunctionName.c_str() );
53 g_CurrentJNIEnv->CallVoidMethod( a_Object, mid );
54 }
55 else
56 {
57 __android_log_print(ANDROID_LOG_ERROR,"MCServer", "It was 0, derp" );
58 }
59}

Callers

nothing calls this directly

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected