Package org.apache.jorphan.reflect
Class ClassTools
-
- All Implemented Interfaces:
public class ClassTools
Utility methods for handling dynamic access to classes.
-
-
Constructor Summary
Constructors Constructor Description ClassTools()
-
Method Summary
Modifier and Type Method Description static Object
construct(String className)
Call no-args constructor for a class. static Object
construct(String className, int parameter)
Call a class constructor with an integer parameter static Object
construct(String className, String parameter)
Call a class constructor with an String parameter static void
invoke(Object instance, String methodName)
Invoke a public method on a class instance -
-
Method Detail
-
construct
static Object construct(String className)
Call no-args constructor for a class.
- Parameters:
className
- name of the class to be constructed
-
construct
static Object construct(String className, int parameter)
Call a class constructor with an integer parameter
- Parameters:
className
- name of the class to be constructedparameter
- the value to be used in the constructor
-
construct
static Object construct(String className, String parameter)
Call a class constructor with an String parameter
- Parameters:
className
- the name of the class to constructparameter
- to be used for the construction of the class instance
-
-
-
-