public final class ClassUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
newInstance(String className,
Class<T> clazz)
Creates a new instance of the given class name using the nullary constructor.
|
public static <T> T newInstance(String className, Class<T> clazz) throws ClassNotFoundException, InstantiationException, IllegalAccessException
T
- the expected class typeclazz
- the classclassName
- the class nameClassNotFoundException
- if the class could not be foundInstantiationException
- if the class could not be instantiatedIllegalAccessException
- if the class access was illegal