Search code examples
reflectionjava-native-interface

List methods in Java class from JNI


Is there a way to list methods in a Java class using the JNI api? I can only see the 'getMethodID" function, which requires explicit name & signature.

Invoking the Java reflection API over JNI seems a bit like overkill, not to mention the difficulty in extracting the VM signatures.


Solution

  • You can create your own Java wrapper around Reflection which calls reflection API and call it from JNI instead of reflection API. This would be much lighter weight solution.