A utility class to parse a command line contained in a single String into
an array of argument tokens, much as the JVM (or more accurately, your
operating system) does before calling your programs' public static
void main(String[] args)
methods.
A StringParser that enforces a limited set of String options for its
values.
These values are provided in the constructor together with one or two parameters
that control the processing of these values.
Constructs a new instance of EnumeratedStringParser with parameter
"caseSensitive" set to false and "checkOptionChars" set to true.
All command line arguments for this parser and the values provided
by the user in this constructor are converted to lower case.
Validates the JSAP configuration and, if successful, writes the java
source code for a JSAP subclass
that implements the configuration specified in the ant build file.
Stores/provides a single name/value pair for a PropertyStringParser
For detailed information on using the jsap task, see the documentation for
JSAPAntTask.
When parsing, the following arguments are interpreted as TRUE:
null
"t" (case-insensitive)
"true" (case-insensitive)
"y" (case-insensitive)
"yes" (case-insensitive)
"1"
The following arguments are interpreted as FALSE:
"f" (case-insensitive)
"false" (case-insensitive)
"n" (case-insensitive)
"no" (case-insensitive)
"0"
Parses the specified argument using either the java.text.SimpleDateFormat
for the current locale
(by default) or a java.text.SimpleDateFormat as defined by this
PropertyStringParser's "format"
property.
Parses the specified argument, making sure it matches one of the valid
options supplied to its constructor.
If the specified argument is not a valid option,
a ParseException is thrown.
A QualifiedSwitch is a parameter that has something in common with a Switch,
i.e., its presence or absence is significant, but different from a "pure"
Switch it can have an additional value (or values) prefixed by a ':' sign
that qualifies the Switch - making it behave like a FlaggedOption if a value
is specified.
Registers a new DefaultSource with this JSAP, at the end of the current
DefaultSource chain, but before the defaults defined within the
AbstractParameters themselves.
A Switch is a parameter whose presence alone is significant; another
commonly used term for a Switch is "Flag."
Switches use a BooleanStringParser internally, so their results can be
obtained from a JSAPResult using
the getBoolean() methods.
An example of a command line using a Switch is "dosomething -v", where
"-v" might mean "verbose."