Reputation: 135
For method:
Ldalvik/system/DexClassLoader;->findClass(Ljava/lang/String;)Ljava/lang/Class;
that DexClassLoader
inherits from ClassLoader
The following call to Class.getMethod()
fails with a NoSuchMethodException
:
Class.forName("dalvik.system.DexClassLoader")).getMethod("findClass",Class.forName("java.lang.String"))
I don't understand why this call fails. Unless I am missing something, the method is inherited and should be returned.
Upvotes: 1
Views: 117
Reputation: 135
findClass
is protected
and will thus not be returned by getMethod()
. Instead getDeclaredMethod()
should be used, as it will also return private
and protected
access level methods.
Upvotes: 1