Class PathConverter

java.lang.Object
joptsimple.util.PathConverter
All Implemented Interfaces:
ValueConverter<Path>

public class PathConverter extends Object implements ValueConverter<Path>
Converts command line options to Path objects and checks the status of the underlying file.
  • Constructor Details

    • PathConverter

      public PathConverter(PathProperties... pathProperties)
  • Method Details

    • convert

      public Path convert(String value)
      Description copied from interface: ValueConverter
      Converts the given string value into a Java type.
      Specified by:
      convert in interface ValueConverter<Path>
      Parameters:
      value - the string to convert
      Returns:
      the converted value
    • valueType

      public Class<Path> valueType()
      Description copied from interface: ValueConverter
      Gives the class of the type of values this converter converts to.
      Specified by:
      valueType in interface ValueConverter<Path>
      Returns:
      the target class for conversion
    • valuePattern

      public String valuePattern()
      Description copied from interface: ValueConverter
      Gives a string that describes the pattern of the values this converter expects, if any. For example, a date converter can respond with a date format string.
      Specified by:
      valuePattern in interface ValueConverter<Path>
      Returns:
      a value pattern, or null if there's nothing interesting here