public class ClassInstantiator
extends java.lang.Object
Constructor and Description |
---|
ClassInstantiator() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
instantiate(java.lang.String className,
java.lang.Class<T> clazz)
Instantiates the named class using reflection and a no-arg constructor.
|
public static <T> T instantiate(java.lang.String className, java.lang.Class<T> clazz)
className
- Name of the class to be instantiatedclazz
- So can do a cast to make sure the className is for the desired
class and so can get desired class name for logging errors