Modifier and Type | Field and Description |
---|---|
protected Option |
DefaultParser.currentOption
The last option parsed.
|
private Option |
PosixParser.currentOption
Deprecated.
holder for the current option
|
private Option |
AlreadySelectedException.option
The option that triggered the exception.
|
private Option |
MissingArgumentException.option
The option requiring additional arguments
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,Option> |
Options.longOpts
a map of the options with the long key
|
protected java.util.Comparator<Option> |
HelpFormatter.optionComparator
Comparator used to sort the options when they output in help text
Defaults to case-insensitive alphabetical sorting by option key
|
private java.util.Map<java.lang.String,Option> |
OptionGroup.optionMap
hold the options
|
private java.util.List<Option> |
CommandLine.options
the processed options
|
private java.util.Map<java.lang.String,Option> |
Options.shortOpts
a map of the options with the character key
|
Modifier and Type | Method and Description |
---|---|
Option |
Option.Builder.build()
Constructs an Option with the values declared by this
Option.Builder . |
static Option |
OptionBuilder.create()
Deprecated.
Create an Option using the current settings
|
static Option |
OptionBuilder.create(char opt)
Deprecated.
Create an Option using the current settings and with
the specified Option
char . |
static Option |
OptionBuilder.create(java.lang.String opt)
Deprecated.
Create an Option using the current settings and with
the specified Option
char . |
(package private) Option |
Options.getLongOption(java.lang.String opt)
Retrieve the
Option matching the long name specified. |
Option |
AlreadySelectedException.getOption()
Returns the option that was added to the group and triggered the exception.
|
Option |
MissingArgumentException.getOption()
Return the option requiring an argument that wasn't provided
on the command line.
|
Option |
Options.getOption(java.lang.String opt)
Retrieve the
Option matching the long or short name specified. |
Option[] |
CommandLine.getOptions()
Returns an array of the processed
Option s. |
private Option |
CommandLine.resolveOption(java.lang.String opt)
Retrieves the option object given the long or short option as a String
|
Modifier and Type | Method and Description |
---|---|
java.util.Comparator<Option> |
HelpFormatter.getOptionComparator()
Comparator used to sort the options when they output in help text.
|
java.util.Collection<Option> |
OptionGroup.getOptions() |
java.util.Collection<Option> |
Options.getOptions()
Retrieve a read-only list of options in this set
|
(package private) java.util.List<Option> |
Options.helpOptions()
Returns the Options for use by the HelpFormatter.
|
java.util.Iterator<Option> |
CommandLine.iterator()
Returns an iterator over the Option members of CommandLine.
|
Modifier and Type | Method and Description |
---|---|
protected void |
CommandLine.addOption(Option opt)
Add an option to the command line.
|
CommandLine.Builder |
CommandLine.Builder.addOption(Option opt)
Add an option to the command line.
|
OptionGroup |
OptionGroup.addOption(Option option)
Add the specified
Option to this group. |
Options |
Options.addOption(Option opt)
Adds an option instance
|
private void |
HelpFormatter.appendOption(java.lang.StringBuffer buff,
Option option,
boolean required)
Appends the usage clause for an Option to a StringBuffer.
|
int |
HelpFormatter.OptionComparator.compare(Option opt1,
Option opt2)
Compares its two arguments for order.
|
OptionGroup |
Options.getOptionGroup(Option opt)
Returns the OptionGroup the
opt belongs to. |
private void |
DefaultParser.handleOption(Option option) |
void |
Parser.processArgs(Option opt,
java.util.ListIterator<java.lang.String> iter)
Deprecated.
Process the argument values for the specified Option
opt using the values retrieved from the
specified iterator iter . |
void |
OptionGroup.setSelected(Option option)
Set the selected option of this group to
name . |
private void |
DefaultParser.updateRequiredOptions(Option option)
Removes the option or its group from the list of expected elements.
|
private void |
Parser.updateRequiredOptions(Option opt)
Deprecated.
Removes the option or its group from the list of expected elements.
|
Modifier and Type | Method and Description |
---|---|
void |
HelpFormatter.setOptionComparator(java.util.Comparator<Option> comparator)
Set the comparator used to sort the options when they output in help text.
|
Constructor and Description |
---|
AlreadySelectedException(OptionGroup group,
Option option)
Construct a new
AlreadySelectedException
for the specified option group. |
MissingArgumentException(Option option)
Construct a new
MissingArgumentException
with the specified detail message. |