public class ReflectionLoading
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ReflectionLoading.ReflectionLoadingException
This class encapsulates all of the exceptions that can be thrown
when loading something by reflection.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
loadByReflection(java.lang.String className,
java.lang.Object... arguments)
Create an object of type T by calling the class constructor with the given arguments.
|
public static <T> T loadByReflection(java.lang.String className,
java.lang.Object... arguments)
String s = ReflectionLoading.loadByReflection("java.lang.String", "foo");
String s = ReflectionLoading.loadByReflection("java.lang.String");
Integer i = ReflectionLoading.loadByReflection("java.lang.String");