Created
March 19, 2011 21:21
-
-
Save patrickbaumann/877811 to your computer and use it in GitHub Desktop.
Reflection example in Java
This file contains 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
import java.lang.reflect.*; | |
/* ... */ | |
Class c = module.getClass(); | |
Method configureMethod = c.getDeclaredMethod("configure", new Class[] { } ); | |
configureMethod.setAccessible(true); | |
configureMethod.invoke(module, new Object[]{}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment