Uses of Class
org.apache.commons.cli.Option
-
Uses of Option in org.apache.commons.cli
Fields in org.apache.commons.cli declared as OptionModifier and TypeFieldDescriptionprotected Option
DefaultParser.currentOption
The last option parsed.private Option
PosixParser.currentOption
Deprecated.holder for the current optionprivate final Option
AlreadySelectedException.option
The option that triggered the exception.private Option
MissingArgumentException.option
The option requiring additional argumentsFields in org.apache.commons.cli with type parameters of type OptionModifier and TypeFieldDescriptionOptions.longOpts
a map of the options with the long keyprotected Comparator<Option>
HelpFormatter.optionComparator
Comparator used to sort the options when they output in help text Defaults to case-insensitive alphabetical sorting by option keyOptionGroup.optionMap
hold the optionsCommandLine.options
The processed optionsOptions.shortOpts
a map of the options with the character keyMethods in org.apache.commons.cli that return OptionModifier and TypeMethodDescriptionOption.Builder.build()
Constructs an Option with the values declared by thisOption.Builder
.static Option
OptionBuilder.create()
Deprecated.Creates an Option using the current settingsstatic Option
OptionBuilder.create
(char opt) Deprecated.Creates an Option using the current settings and with the specified Optionchar
.static Option
Deprecated.Creates an Option using the current settings and with the specified Optionchar
.AlreadySelectedException.getOption()
Gets the option that was added to the group and triggered the exception.MissingArgumentException.getOption()
Return the option requiring an argument that wasn't provided on the command line.Gets theOption
matching the long or short name specified.Option[]
CommandLine.getOptions()
Gets an array of the processedOption
s.private Option
CommandLine.resolveOption
(String opt) Retrieves the option object given the long or short option as a StringMethods in org.apache.commons.cli that return types with arguments of type OptionModifier and TypeMethodDescriptionHelpFormatter.getOptionComparator()
Comparator used to sort the options when they output in help text.OptionGroup.getOptions()
Options.getOptions()
Gets a read-only list of options in this setOptions.helpOptions()
Returns the Options for use by the HelpFormatter.CommandLine.iterator()
Returns an iterator over the Option members of CommandLine.Methods in org.apache.commons.cli with parameters of type OptionModifier and TypeMethodDescriptionprotected void
Add an option to the command line.Add an option to the command line.Add the specifiedOption
to this group.Adds an option instanceprivate void
HelpFormatter.appendOption
(StringBuffer buff, Option option, boolean required) Appends the usage clause for an Option to a StringBuffer.int
Compares its two arguments for order.Options.getOptionGroup
(Option opt) Gets the OptionGroup theopt
belongs to.CommandLine.getOptionProperties
(Option option) Retrieve the map of values associated to the option.CommandLine.getOptionValue
(Option option) Retrieve the first argument, if any, of this option.CommandLine.getOptionValue
(Option option, String defaultValue) Retrieve the first argument, if any, of an option.String[]
CommandLine.getOptionValues
(Option option) Retrieves the array of values, if any, of an option.CommandLine.getParsedOptionValue
(Option option) Return a version of thisOption
converted to a particular type.private void
DefaultParser.handleOption
(Option option) boolean
Tests to see if an option has been set.void
Parser.processArgs
(Option opt, ListIterator<String> iter) Deprecated.Process the argument values for the specified Optionopt
using the values retrieved from the specified iteratoriter
.void
OptionGroup.setSelected
(Option option) Set the selected option of this group toname
.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.Method parameters in org.apache.commons.cli with type arguments of type OptionModifier and TypeMethodDescriptionvoid
HelpFormatter.setOptionComparator
(Comparator<Option> comparator) Set the comparator used to sort the options when they output in help text.Constructors in org.apache.commons.cli with parameters of type OptionModifierConstructorDescriptionprivate
AlreadySelectedException
(String message, OptionGroup group, Option option) AlreadySelectedException
(OptionGroup group, Option option) Constructs a newAlreadySelectedException
for the specified option group.MissingArgumentException
(Option option) Construct a newMissingArgumentException
with the specified detail message.