Class Converters

java.lang.Object
org.apache.jmeter.report.core.Converters

public final class Converters extends Object
The class Converters provides converters of string.
Since:
3.0
  • Method Details

    • getConverter

      public static <T> StringConverter<T> getConverter(Class<T> clazz)
      Gets the converter for the specified class.
      Type Parameters:
      T - the target type
      Parameters:
      clazz - the target class
      Returns:
      the converter
    • convert

      public static <T> T convert(Class<T> clazz, String value) throws ConvertException
      Converts the specified value to the destination type
      Type Parameters:
      T - the target type
      Parameters:
      clazz - the target class
      value - the value to convert
      Returns:
      the converted value
      Throws:
      ConvertException - when the conversion failed