Class ExistingFileParam

java.lang.Object
org.rwtodd.args.BasicOneArgParam<Path>
org.rwtodd.args.ExistingFileParam
All Implemented Interfaces:
OneArgParam, Param

public class ExistingFileParam extends BasicOneArgParam<Path>
A param that takes expects an existing file on the filesystem.
  • Constructor Details

  • Method Details

    • convertArg

      protected Path convertArg(String param, String argument) throws ArgParserException
      Description copied from class: BasicOneArgParam
      A conversion method to get a T from a string. All subclasses must define this for the type they handle.
      Specified by:
      convertArg in class BasicOneArgParam<Path>
      Parameters:
      param - the name of the parameter found on the command line. In some cases it might affect conversion, but it is also good for error messages.
      argument - the argument to convert to a type T.
      Returns:
      the converted argument.
      Throws:
      ArgParserException