Skip to content

Instantly share code, notes, and snippets.

@jpgough
Created August 2, 2014 22:46
Reflection on a custom class loader
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