public class ClassTools extends Object
Constructor | Description |
---|---|
ClassTools() |
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
|
public static Object construct(String className) throws JMeterException
className
- name of the class to be constructedJMeterException
- 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 constructorJMeterException
- 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 instanceJMeterException
- 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 calledSecurityException
- if a security violation occurred while looking for the methodIllegalArgumentException
- if the method parameters (none given) do not match the
signature of the methodJMeterException
- if something went wrong in the invoked methodCopyright © 1998-2018 Apache Software Foundation. All Rights Reserved.