- java.lang.Object
-
- snaq.util.jclap.Option<String>
-
- snaq.util.jclap.StringOption
-
- snaq.util.jclap.FileOption
-
public class FileOption extends StringOption
- Author:
- Giles Winstanley
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileOption.FileFilterImplementation of anStringOption.Filterwhich filters based on existence and type of file to which the string refers.-
Nested classes/interfaces inherited from class snaq.util.jclap.StringOption
StringOption.Filter
-
-
Field Summary
-
Fields inherited from class snaq.util.jclap.Option
BUNDLE, LOCALE, MAX_COUNT_LIMIT, MIN_COUNT_LIMIT
-
-
Constructor Summary
Constructors Constructor Description FileOption(String shortName, String longName, String description, boolean mandatory, boolean allowMany)Creates a newFileOptioninstance.FileOption(String shortName, String longName, String description, int minCount, int maxCount)Creates a newFileOptioninstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetUsageTypeString(ResourceBundle res)-
Methods inherited from class snaq.util.jclap.StringOption
getFilter, getType, parseValue, setFilter
-
Methods inherited from class snaq.util.jclap.Option
addValue, equals, getDescription, getLongName, getMaxCount, getMinCount, getShortName, getValues, hashCode, isAllowMany, isHidden, isMandatory, requiresValue, setHidden, setMinMaxCounts, toString
-
-
-
-
Constructor Detail
-
FileOption
public FileOption(String shortName, String longName, String description, int minCount, int maxCount)
Creates a newFileOptioninstance.- Parameters:
shortName- short name of the option (e.g. -t)longName- long name of the option (e.g. --type)description- helpful description of the option (printed for usage message)minCount- minimum number of occurrences required for this optionmaxCount- maximum number of occurrences required for this option
-
FileOption
public FileOption(String shortName, String longName, String description, boolean mandatory, boolean allowMany)
Creates a newFileOptioninstance.- Parameters:
shortName- short name of the option (e.g. -t)longName- long name of the option (e.g. --type)description- helpful description of the option (printed for usage message)mandatory- whether this option must be specifiedallowMany- whether this option can take more than one value (i.e. be specified more than once)
-
-
Method Detail
-
getUsageTypeString
protected String getUsageTypeString(ResourceBundle res)
-
-