Skip to content

Instantly share code, notes, and snippets.

@patrickbaumann
Created March 19, 2011 21:21
Show Gist options
  • Save patrickbaumann/877811 to your computer and use it in GitHub Desktop.
Save patrickbaumann/877811 to your computer and use it in GitHub Desktop.
Reflection example in Java
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