Package org.rwtodd.args
Class ExistingFileParam
- All Implemented Interfaces:
OneArgParam,Param
A param that takes expects an existing file on the filesystem.
-
Field Summary
Fields inherited from class org.rwtodd.args.BasicOneArgParam
arg, helpText, paramNames -
Constructor Summary
ConstructorsConstructorDescriptionExistingFileParam(Collection<String> names, String help) ExistingFileParam(Collection<String> names, Path dflt, String help) -
Method Summary
Modifier and TypeMethodDescriptionprotected PathconvertArg(String param, String argument) A conversion method to get a T from a string.
-
Constructor Details
-
ExistingFileParam
-
ExistingFileParam
-
-
Method Details
-
convertArg
Description copied from class:BasicOneArgParamA conversion method to get a T from a string. All subclasses must define this for the type they handle.- Specified by:
convertArgin classBasicOneArgParam<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
-