Class ClassNameToInstanceConverter<T>

java.lang.Object
com.github.hypfvieh.cli.parser.converter.ClassNameToInstanceConverter<T>
All Implemented Interfaces:
IValueConverter<T>

public class ClassNameToInstanceConverter<T> extends Object implements IValueConverter<T>
Converts a fully qualified class name to an instance of that class by invoking its default constructor.
Since:
1.0.1 - 2022-06-29
  • Constructor Details

    • ClassNameToInstanceConverter

      public ClassNameToInstanceConverter()
  • Method Details

    • convert

      public T convert(String _str)
      Description copied from interface: IValueConverter
      Called to convert command line argument String to specified type.
      Specified by:
      convert in interface IValueConverter<T>
      Parameters:
      _str - input string, maybe empty/blank, never null
      Returns:
      converted value, never null