|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jorphan.reflect.ClassTools
public class ClassTools
Utility methods for handling dynamic access to classes.
Constructor Summary | |
---|---|
ClassTools()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassTools()
Method Detail |
---|
public static Object construct(String className) throws JMeterException
className
- name of the class to be constructed
JMeterException
- if class cannot be createdpublic static Object construct(String className, int parameter) throws JMeterException
className
- name of the class to be constructedparameter
- the value to be used in the constructor
JMeterException
- if class cannot be createdpublic static Object construct(String className, String parameter) throws JMeterException
className
- the name of the class to constructparameter
- to be used for the construction of the class instance
JMeterException
- if class cannot be createdpublic static void invoke(Object instance, String methodName) throws SecurityException, IllegalArgumentException, JMeterException
instance
- object on which the method should be calledmethodName
- name of the method to be called
SecurityException
- if a security violation occurred while looking for the method
IllegalArgumentException
- if the method parameters (none given) do not match the
signature of the method
JMeterException
- if something went wrong in the invoked method
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |