public final class RuntimeReflection extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
register(Class<?>... classes)
Makes the provided classes available for reflection at run time.
|
static void |
register(Executable... methods)
Makes the provided methods available for reflection at run time.
|
static void |
register(Field... fields)
Makes the provided fields available for reflection at run time.
|
static void |
registerAsQueried(Executable... methods)
Makes the provided methods available for reflection queries at run time.
|
static void |
registerForReflectiveInstantiation(Class<?>... classes)
Makes the provided classes available for reflective instantiation by
Class.newInstance(). |
public static void register(Class<?>... classes)
Class.forName(java.lang.String) for the names of the classes will return the classes at run time.public static void register(Executable... methods)
Class.getMethod(java.lang.String, java.lang.Class<?>...), Class.getMethods(),and all the other methods on
Class that return a single or a list of methods.public static void registerAsQueried(Executable... methods)
Class.getMethod(java.lang.String, java.lang.Class<?>...), Class.getMethods(), and all the other methods on
Class that return a single or a list of methods, but will not be invocable and will
not be considered reachable.public static void register(Field... fields)
Class.getField(java.lang.String), Class.getFields(),and all the other methods on Class
that return a single or a list of fields.public static void registerForReflectiveInstantiation(Class<?>... classes)
Class.newInstance(). This is equivalent to registering the nullary constructors of the
classes.