| Package | Description |
|---|---|
| snaq.util.jclap |
Library for parsing command-line arguments in Java applications.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BooleanOption
Implementation of an
Option with value of type Boolean
(otherwise known as a "flag"). |
class |
DoubleOption
Implementation of an
Option with value of type Double. |
class |
EnumeratedIntegerOption
Implementation of an
Option with value restricted to a
specified enumeration of type Integer. |
class |
EnumeratedOption<E>
Implementation of an
Option with value restricted to an
enumeration of a specified return value type. |
class |
EnumeratedStringOption
Implementation of an
Option with value restricted to a
specified enumeration of type String. |
class |
FileOption |
class |
FloatOption
Implementation of an
Option with value of type Float. |
class |
IntegerOption
Implementation of an
Option with value of type Integer. |
class |
LocalDateOption
Option implementation for specifying date values.
|
class |
LongOption
Implementation of an
Option with value of type Long. |
class |
StringOption
Implementation of an
Option with value of type String. |
| Modifier and Type | Method and Description |
|---|---|
Option<Boolean> |
CLAParser.addBooleanOption(String shortName)
Convenience method to add an
Option of type Boolean
(single value allowed). |
Option<Boolean> |
CLAParser.addBooleanOption(String shortName,
boolean allowMany)
Convenience method to add an
Option of type Boolean. |
Option<Boolean> |
CLAParser.addBooleanOption(String shortName,
int maxCount)
Convenience method to add an
Option of type Boolean. |
Option<Boolean> |
CLAParser.addBooleanOption(String shortName,
String longName,
String description)
Convenience method to add an
Option of type Boolean
(single value allowed). |
Option<Boolean> |
CLAParser.addBooleanOption(String shortName,
String longName,
String description,
boolean allowMany)
Convenience method to add an
Option of type Boolean. |
Option<Boolean> |
CLAParser.addBooleanOption(String shortName,
String longName,
String description,
int maxCount)
Convenience method to add an
Option of type Boolean. |
Option<Boolean> |
CLAParser.addBooleanOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Convenience method to add an
Option of type Boolean. |
Option<Double> |
CLAParser.addDoubleOption(String shortName,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type Double. |
Option<Double> |
CLAParser.addDoubleOption(String shortName,
int minCount,
int maxCount)
Convenience method to add an
Option of type Double. |
Option<Double> |
CLAParser.addDoubleOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type Double. |
Option<Double> |
CLAParser.addDoubleOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Convenience method to add an
Option of type Double. |
Option<Integer> |
CLAParser.addEnumIntegerOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany,
int[] allowedValues)
Convenience method to add an
Option of enumerated Integer type. |
Option<Integer> |
CLAParser.addEnumIntegerOption(String shortName,
String longName,
String description,
int[] allowedValues)
Convenience method to add an
Option of enumerated Integer type
(single value allowed, non-mandatory). |
Option<String> |
CLAParser.addEnumStringOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany,
String[] allowedValues)
Convenience method to add an
Option of enumerated String type
(case-insensitive string matching). |
Option<String> |
CLAParser.addEnumStringOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany,
String[] allowedValues,
boolean ignoreCase)
Convenience method to add an
Option of enumerated String type. |
Option<String> |
CLAParser.addEnumStringOption(String shortName,
String longName,
String description,
int minCount,
int maxCount,
String[] allowedValues,
boolean ignoreCase)
Convenience method to add an
Option of enumerated String type. |
Option<String> |
CLAParser.addEnumStringOption(String shortName,
String longName,
String description,
String[] allowedValues)
Convenience method to add an
Option of enumerated String type
(single value allowed, non-mandatory). |
Option<String> |
CLAParser.addFileExistingOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type String which
refers to an existing file (which is not a folder). |
Option<String> |
CLAParser.addFileExistingOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Convenience method to add an
Option of type String which
refers to an existing file (which is not a folder). |
Option<String> |
CLAParser.addFileNewOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type String which
refers to a new or existing file/folder. |
Option<String> |
CLAParser.addFileOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type String which
refers to a file/folder. |
Option<Float> |
CLAParser.addFloatOption(String shortName,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type Float. |
Option<Float> |
CLAParser.addFloatOption(String shortName,
int minCount,
int maxCount)
Convenience method to add an
Option of type Float. |
Option<Float> |
CLAParser.addFloatOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type Float. |
Option<Float> |
CLAParser.addFloatOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Convenience method to add an
Option of type Float. |
Option<String> |
CLAParser.addFolderExistingOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type String which
refers to an existing folder. |
Option<String> |
CLAParser.addFolderExistingOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Convenience method to add an
Option of type String which
refers to an existing folder. |
Option<Integer> |
CLAParser.addIntegerOption(String shortName,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type Integer. |
Option<Integer> |
CLAParser.addIntegerOption(String shortName,
int minCount,
int maxCount)
Convenience method to add an
Option of type Integer. |
Option<Integer> |
CLAParser.addIntegerOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type Integer. |
Option<Integer> |
CLAParser.addIntegerOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Convenience method to add an
Option of type Integer. |
Option<LocalDate> |
CLAParser.addLocalDateOption(String shortName,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type LocalDate
(no long name, no description). |
Option<LocalDate> |
CLAParser.addLocalDateOption(String shortName,
int minCount,
int maxCount)
Convenience method to add an
Option of type LocalDate
(no long name, no description). |
Option<LocalDate> |
CLAParser.addLocalDateOption(String shortName,
String longName,
String description)
Convenience method to add an
Option of type LocalDate
(single value allowed, non-mandatory). |
Option<LocalDate> |
CLAParser.addLocalDateOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type LocalDate. |
Option<LocalDate> |
CLAParser.addLocalDateOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Convenience method to add an
Option of type LocalDate. |
Option<Long> |
CLAParser.addLongOption(String shortName,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type Long. |
Option<Long> |
CLAParser.addLongOption(String shortName,
int minCount,
int maxCount)
Convenience method to add an
Option of type Long. |
Option<Long> |
CLAParser.addLongOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type Long. |
Option<Long> |
CLAParser.addLongOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Convenience method to add an
Option of type Long. |
<T> Option<T> |
CLAParser.addOption(Option<T> opt)
Adds the specified
Option to the list of those to be parsed
from the command-line arguments. |
Option<String> |
CLAParser.addStringOption(String shortName,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type String
(no long name, no description). |
Option<String> |
CLAParser.addStringOption(String shortName,
int minCount,
int maxCount)
Convenience method to add an
Option of type String
(no long name, no description). |
Option<String> |
CLAParser.addStringOption(String shortName,
String longName,
String description)
Convenience method to add an
Option of type String
(single value allowed, non-mandatory). |
Option<String> |
CLAParser.addStringOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Convenience method to add an
Option of type String. |
Option<String> |
CLAParser.addStringOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Convenience method to add an
Option of type String. |
<T> Option<T> |
CLAParser.getOption(String optionName,
Class<T> type)
Returns the
Option with the specified name (either short or long). |
Option<E> |
Option.setHidden()
Sets the flag to hide this option from the usage message.
|
| Modifier and Type | Method and Description |
|---|---|
List<Option> |
CLAParser.getOptions()
Returns all the
Option instances registered with the parser. |
| Modifier and Type | Method and Description |
|---|---|
<T> Option<T> |
CLAParser.addOption(Option<T> opt)
Adds the specified
Option to the list of those to be parsed
from the command-line arguments. |
<T> T |
CLAParser.getOptionValue(Option<T> opt)
Convenience method to return the parsed value of the specified option,
or null if the option was not set.
|
<T> T |
CLAParser.getOptionValue(Option<T> opt,
T def)
Convenience method to return the parsed value of the specified option,
or the specified default value if the option was not set.
|
<T> List<T> |
CLAParser.getOptionValues(Option<T> opt)
Returns a list of all the parsed values for the specified option,
or an empty list if the option was not set.
|
| Constructor and Description |
|---|
OptionException(OptionException.Type type,
Option option)
Creates a new
OptionException instance. |
OptionException(OptionException.Type type,
Option option,
String optionValue)
Creates a new
OptionException instance. |
Copyright © 2015. All rights reserved.