Skip to content Skip to sidebar Skip to footer

How To Know The Jclass To Which A Jobject Belongs (jni)

I need to call the same native C method from my JNI code. This method receives a generic jobject object, but its behavior is different depending on the type of the object itself. I

Solution 1:

How about using IsInstanceOf?

IsInstanceOf

jboolean IsInstanceOf(JNIEnv *env, jobject obj, jclass clazz);

Tests whether an object is an instance of a class.

JNI documentation

Post a Comment for "How To Know The Jclass To Which A Jobject Belongs (jni)"