Class ClassTools


  • public class ClassTools
    extends Object
    Utility methods for handling dynamic access to classes.
    • Constructor Detail

      • ClassTools

        public ClassTools()
    • Method Detail

      • construct

        public static Object construct​(String className)
                                throws JMeterException
        Call no-args constructor for a class.
        Parameters:
        className - name of the class to be constructed
        Returns:
        an instance of the class
        Throws:
        JMeterException - if class cannot be created
      • construct

        public static Object construct​(String className,
                                       int parameter)
                                throws JMeterException
        Call a class constructor with an integer parameter
        Parameters:
        className - name of the class to be constructed
        parameter - the value to be used in the constructor
        Returns:
        an instance of the class
        Throws:
        JMeterException - if class cannot be created
      • construct

        public static Object construct​(String className,
                                       String parameter)
                                throws JMeterException
        Call a class constructor with an String parameter
        Parameters:
        className - the name of the class to construct
        parameter - to be used for the construction of the class instance
        Returns:
        an instance of the class
        Throws:
        JMeterException - if class cannot be created