public final class ClassUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
instantiateClass(java.lang.String className,
java.lang.Class<?> expectedType)
Instantiates a class.
|
public static final java.lang.Object instantiateClass(java.lang.String className, java.lang.Class<?> expectedType)
The class is expected to have a public no-argument constructor.
className
- the class nameexpectedType
- the expected (super) type of the resultJRRuntimeException
- if the class cannot be loaded or instantiated,
or if it does not implement the expected type© 2001-2010 Jaspersoft Corporation www.jaspersoft.com