Add the value to this Option.
Add left-over unrecognized option/argument.
Add an option to the command line.
Add an option that only contains a short-name.
Add an option that contains a short-name and a long-name.
Add the specified option group.
This method is not intended to be used.
Adds the specified value to this Option.
Thrown when more than one option in an option group
has been provided.
Construct a new AlreadySelectedException
with the specified detail message.
Appends the usage clause for an Option to a StringBuffer.
Appends the usage clause for an OptionGroup to a StringBuffer.
argName specifies the name of the argument for this option
the unrecognised options/arguments
A rather odd clone method - due to incorrect code in 1.0 it is public
and in 1.1 rather than throwing a CloneNotSupportedException it throws
a RuntimeException so as to maintain backwards compat at the API level.
cmd - field in class org.apache.commons.cli.
Parser commandline instance
Represents list of arguments parsed against
a
Options
descriptor.
A class that implements the
CommandLineParser
interface
can parse a String array according to the
Options
specified
and return a
CommandLine
.
Compares its two arguments for order.
Create an Option using the current settings
Create an Option using the current settings and with
the specified Option char
.
Create an Option using the current settings and with
the specified Option char
.
Returns the class whose name is str
.
Returns the date represented by str
.
Returns the File represented by str
.
Returns the File[] represented by str
.
Create a number from a String.
Create an Object from the classname and empty constructor.
Return a String of padding of length len
.
Returns the URL represented by str
.
Returns the Object
of type clazz
with the value of str
.
Returns the Object
of type obj
with the value of str
.
holder for the current option
default name for an argument
the number of characters of padding to be prefixed
to each description line
default padding to the left of each line
default prefix for long Option
default prefix for shortOpts
the string to display at the begining of the usage statement
default number of characters per line
the number of characters of padding to be prefixed
to each description line
amount of padding to the left of each line
the string to display at the begining of the usage statement
number of characters per line
description of the option
Retrieve any left-over non-recognized options and arguments
Gets the display name for the argument value.
Retrieve any left-over non-recognized options and arguments
Returns the number of argument values this Option can take.
Returns the 'descPadding'.
Retrieve the self-documenting description of this Option
Returns the id of this Option.
Returns the 'unique' Option identifier.
Returns the 'leftPadding'.
Retrieve the long name of this Option.
Returns the 'longOptPrefix'.
Retrieve the name of this Option.
Returns the OptionGroup the opt
belongs to.
Lists the OptionGroups that are members of this Options instance.
Return the Object
type of this Option
.
Return the Object
type of this Option
.
Returns an array of the processed
Option
s.
Retrieve a read-only list of options in this set
Retrieve the argument, if any, of this option.
Retrieve the argument, if any, of an option.
Retrieve the argument, if any, of this option.
Retrieve the argument, if any, of an option.
Retrieves the array of values, if any, of an option.
Retrieves the array of values, if any, of an option.
Returns the required options as a
java.util.Collection
.
Returns the 'syntaxPrefix'.
Retrieve the type of this Option.
Returns the specified value of this Option or
null
if there is no value.
Returns the specified value of this Option or
null
if there is no value.
Returns the value/first value of this Option or the
defaultValue
if there is no value.
Retrieve the class that ch
represents.
Return the values of this Option as a String array
or null if there are no values
Returns the value separator character.
The class GnuParser provides an implementation of the
flatten
method.
Adds the remaining tokens to the processed tokens list.
hasArg specifies whether this option has an associated argument
Query to see if this Option requires an argument
The next Option created will require an argument value.
The next Option created will require an argument value if
hasArg
is true.
Returns whether the display name for the argument value
has been set.
Query to see if this Option can take many values.
The next Option created can have unlimited argument values.
The next Option created can have num
argument values.
Query to see if this Option has a long name
Returns whether this Option has any values.
Query to see if an option has been set.
Query to see if an option has been set.
The next Option can have an optional argument.
The next Option can have an unlimited number of
optional arguments.
The next Option can have the specified number of
optional arguments.
Return whether this Option has specified a value separator.
A formatter of help messages for the current command line options
Returns the Options for use by the HelpFormatter.
Resets the members to their original state i.e.
Resets the members to their original state i.e.
Query to see if this Option requires an argument
The next Option created will be required.
Returns whether this option group is required.
The next Option created will be required if required
is true.
Returns whether the specified character is a valid character.
Returns whether the specified character is a valid Option.
Returns whether ch
is a value code, i.e.
Returns an iterator over the Option members of CommandLine.
opt - field in class org.apache.commons.cli.
Option opt the name of the option
Describes a single command-line option.
Creates an Option using the specified parameters.
Creates an Option using the specified parameters.
Creates an Option using the specified parameters.
specifies whether the argument value of this Option is optional
option can have an optional argument value
OptionBuilder allows the user to create Options using descriptive
methods.
private constructor to prevent instances being created
This class implements the Comparator
interface
for comparing Options.
A group of mutually exclusive options.
a map of the option groups
Main entry-point into the library.
Construct a new Options descriptor
Validates an Option string.
Parse the arguments according to the specified options.
Parses the specified
arguments
based on the specifed
Options
.
Parse the arguments according to the specified options.
Parses the specified
arguments
based on the specifed
Options
.
Parse the arguments according to the specified options and
properties.
Parse the arguments according to the specified options and
properties.
Base for Exceptions thrown during parsing of a command-line.
Construct a new ParseException
with the specified detail message.
Returns the
Options
instance represented by
pattern
.
Allows Options to be created from a single String.
The class PosixParser provides an implementation of the
flatten
method.
Print the help for options
with the specified
command line syntax.
Print the help for options
with the specified
command line syntax.
Print the help for options
with the specified
command line syntax.
Print the help for options
with the specified
command line syntax.
Print the help for options
with the specified
command line syntax.
Print the help for options
with the specified
command line syntax.
Print the help for options
with the specified
command line syntax.
Print the help for options
with the specified
command line syntax.
Print the help for the specified Options to the specified writer,
using the specified width, left padding and description padding.
Print the cmdLineSyntax to the specified writer, using the
specified width.
Prints the usage statement for the specified application.
Print the specified text to the specified PrintWriter.
Print the specified text to the specified PrintWriter.
If there is a current option and it can have an argument
value then add the token to the processed tokens list and
set the current option to null.
Process the argument values for the specified Option
opt
using the values retrieved from the
specified iterator iter
.
Process the Option specified by arg
using the values retrieved from the specfied iterator
iter
.
If an
Option
exists for
token
then
set the current option and add the token to the processed
list.
Sets the values of Options using the values in
properties
.
If it is a hyphen then add the hyphen directly to
the processed tokens list.
Render the specified Options and return the rendered Options
in a StringBuffer.
Render the specified text and return the rendered Options
in a StringBuffer.
required specifies whether this option is required to be present
specified whether this group is required
list of required options strings
a map of the required options
Resets the member variables to their default values.
Retrieves the option object given the long or short option as a String
Remove the trailing whitespace from the specified String.
the name of the selected option
Sets the display name for the argument value.
Sets the number of argument values this Option can take.
Sets the self-documenting description of this Option
Sets the long name of this Option.
Sets the 'longOptPrefix'.
Sets whether this Option can have an optional argument.
Sets whether this Option is mandatory.
set the selected option of this group to name
.
Sets the type of this Option.
Sets the value separator.
a map of the options with the character key
Remove the leading and trailing quotes from str
.
Remove the hyphens from the begining of str
and
return the new String.
holder for flattened tokens
holder for flattened tokens
Dump state, suitable for debugging.
Returns the stringified version of this OptionGroup.
Dump state, suitable for debugging.
type - field in class org.apache.commons.cli.
Option the type of this Option
This is a temporary implementation.
The next Option created will have the specified argument value
name.
The next Option created will have the specified description
The next Option created will have the following long option value.
The next Option created will have a value that will be an instance
of type
.
The next Option created uses '=
' as a means to
separate argument values.
The next Option created uses sep
as a means to
separate argument values.