Created
August 2, 2014 22:46
Reflection on a custom class loader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
//Where loader is the custom class loader | |
Class<?> myClass = Class.forName(className, false, loader); | |
for (Method m : myClass.getDeclaredMethods()) { | |
System.out.println(m.getName()); | |
} | |
} catch (ClassNotFoundException e) { | |
e.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment