net.sf.jasperreports.engine.util
Class ClassUtils
java.lang.Object
net.sf.jasperreports.engine.util.ClassUtils
public final class ClassUtils
- extends Object
Class utilities.
- Version:
- $Id: ClassUtils.java 4595 2011-09-08 15:55:10Z teodord $
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instantiateClass
public static final Object instantiateClass(String className,
Class<?> expectedType)
- Instantiates a class.
The class is expected to have a public no-argument constructor.
- Parameters:
className - the class nameexpectedType - the expected (super) type of the result
- Returns:
- a newly created instance of the specified class
- Throws:
JRRuntimeException - if the class cannot be loaded or instantiated,
or if it does not implement the expected type
Copyright © 2012. All Rights Reserved.