Class ClassUtils
java.lang.Object
org.apache.struts.chain.commands.util.ClassUtils
Utility methods to load application classes and create instances.
- Version:
- $Rev$ $Date: 2005-11-12 13:01:44 -0500 (Sat, 12 Nov 2005) $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?> getApplicationClass(String className) Return theClassobject for the specified fully qualified class name, from this web application's class loader.static ObjectgetApplicationInstance(String className) Return a new instance of the specified fully qualified class name, after loading the class (if necessary) from this web application's class loader.
-
Constructor Details
-
ClassUtils
public ClassUtils()
-
-
Method Details
-
getApplicationClass
Return the
Classobject for the specified fully qualified class name, from this web application's class loader.- Parameters:
className- Fully qualified class name- Throws:
ClassNotFoundException- if the specified class cannot be loaded
-
getApplicationInstance
public static Object getApplicationInstance(String className) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException Return a new instance of the specified fully qualified class name, after loading the class (if necessary) from this web application's class loader.- Parameters:
className- Fully qualified class name- Throws:
InstantiationException- if this class has no zero-arguments constructorIllegalAccessException- if this class is not concreteIllegalArgumentException- if the number of actual and formal parameters differInvocationTargetException- if the underlying constructor throws an exceptionNoSuchMethodException- if a matching method is not foundSecurityException- if there is a security-exceptionClassNotFoundException- if the specified class cannot be loaded
-