Uses of Class
org.apache.commons.cli.Option
Packages that use Option
Package
Description
Apache Commons CLI provides a simple API for presenting, processing, and validating a Command Line Interface.
The help production system.
-
Uses of Option in org.apache.commons.cli
Fields in org.apache.commons.cli declared as OptionModifier and TypeFieldDescriptionprotected OptionDefaultParser.currentOptionThe last option parsed.private OptionPosixParser.currentOptionDeprecated.Holder for the current option(package private) static final Option[]Option.EMPTY_ARRAYEmpty array.private final OptionAlreadySelectedException.optionThe option that triggered the exception.private OptionMissingArgumentException.optionThe option requiring additional argumentsFields in org.apache.commons.cli with type parameters of type OptionModifier and TypeFieldDescriptionHelpFormatter.Builder.DEFAULT_DEPRECATED_FORMATA function to convert a description (not null) and a deprecated Option (not null) to help descriptionCommandLine.Builder.DEPRECATED_HANDLERPrints an Option toSystem.out.HelpFormatter.Builder.deprecatedFormatFunctionFormatter for deprecated options.HelpFormatter.deprecatedFormatFunctionDeprecated.Function to format the description for a deprecated option.CommandLine.Builder.deprecatedHandlerDeprecated Option handler.CommandLine.deprecatedHandlerThe deprecated option handler.DefaultParser.Builder.deprecatedHandlerThe deprecated option handler.DefaultParser.deprecatedHandlerThe deprecated option handler.Options.longOptsA map of the options with the long keyprotected Comparator<Option> HelpFormatter.optionComparatorDeprecated.Comparator used to sort the options when they output in help text Defaults to case-insensitive alphabetical sorting by option keyOptionGroup.optionMapMaps options where keys are option name and values are the options.CommandLine.Builder.optionsThe processed optionsCommandLine.optionsThe processed optionsOptions.shortOptsA map of the options with the character keyMethods in org.apache.commons.cli that return OptionModifier and TypeMethodDescriptionOption.Builder.build()Deprecated.static OptionOptionBuilder.create()Deprecated.Creates an Option using the current settings.static OptionOptionBuilder.create(char opt) Deprecated.Creates an Option using the current settings and with the specified Optionchar.static OptionDeprecated.Creates an Option using the current settings and with the specified Optionchar.Option.Builder.get()Constructs an Option with the values declared by thisOption.Builder.AlreadySelectedException.getOption()Gets the option that was added to the group and triggered the exception.MissingArgumentException.getOption()Gets the option requiring an argument that wasn't provided on the command line.Gets theOptionmatching the long or short name specified.Option[]CommandLine.getOptions()Gets an array of the processedOptions.private OptionCommandLine.resolveOption(String optionName) 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()Deprecated.Comparator used to sort the options when they output in help text.OptionGroup.getOptions()Gets the options in this group as aCollection.Options.getOptions()Gets a read-only list of options in this set.Options.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 voidAdds an option to the command line.Adds an option to the command line.Adds the givenOptionto this group.Adds an option instance.private voidHelpFormatter.appendOption(StringBuilder buff, Option option, boolean required) Deprecated.Appends the usage clause for an Option to a StringBuffer.intCompares its two arguments for order.static StringHelpFormatter.getDescription(Option option) Deprecated.Gets the option description or an empty string if the description isnull.intCommandLine.getOptionCount(Option option) Gets the number of times this option appears in the command line.Options.getOptionGroup(Option option) Gets the OptionGroup theoptbelongs to.CommandLine.getOptionProperties(Option option) Gets the map of values associated to the option.CommandLine.getOptionValue(Option option) Gets the first argument, if any, of this option.CommandLine.getOptionValue(Option option, String defaultValue) Gets the first argument, if any, of an option.CommandLine.getOptionValue(Option option, Supplier<String> defaultValue) Gets the first argument, if any, of an option.String[]CommandLine.getOptionValues(Option option) Gets the array of values, if any, of an option.<T> TCommandLine.getParsedOptionValue(Option option) Gets a version of thisOptionconverted to a particular type.<T> TCommandLine.getParsedOptionValue(Option option, Supplier<T> defaultValue) Gets a version of thisOptionconverted to a particular type.<T> TCommandLine.getParsedOptionValue(Option option, T defaultValue) Gets a version of thisOptionconverted to a particular type.<T> T[]CommandLine.getParsedOptionValues(Option option) Gets a version of thisOptionconverted to an array of a particular type.<T> T[]CommandLine.getParsedOptionValues(Option option, Supplier<T[]> defaultValue) Gets a version of thisOptionconverted to an array of a particular type.<T> T[]CommandLine.getParsedOptionValues(Option option, T[] defaultValue) Gets a version of thisOptionconverted to an array of a particular type.private voidCommandLine.handleDeprecated(Option option) Handles deprecated options.private voidDefaultParser.handleOption(Option option) booleanTests to see if an option has been set.voidParser.processArgs(Option opt, ListIterator<String> iter) Deprecated.Processes the argument values for the specified Optionoptusing the values retrieved from the specified iteratoriter.voidOptionGroup.setSelected(Option option) Sets the selected option of this group toname.private voidDefaultParser.updateRequiredOptions(Option option) Removes the option or its group from the list of expected elements.private voidParser.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 TypeMethodDescriptionCommandLine.Builder.setDeprecatedHandler(Consumer<Option> deprecatedHandler) Sets the deprecated option handler.DefaultParser.Builder.setDeprecatedHandler(Consumer<Option> deprecatedHandler) Sets the deprecated option handler.voidHelpFormatter.setOptionComparator(Comparator<Option> comparator) Deprecated.Sets the comparator used to sort the options when they output in help text.HelpFormatter.Builder.setShowDeprecated(Function<Option, String> deprecatedFormatFunction) Sets whether to show deprecated options.Constructors in org.apache.commons.cli with parameters of type OptionModifierConstructorDescriptionprivateAlreadySelectedException(String message, OptionGroup optionGroup, Option option) AlreadySelectedException(OptionGroup optionGroup, Option option) Constructs a newAlreadySelectedExceptionfor the specified option group.MissingArgumentException(Option option) Constructs a newMissingArgumentExceptionwith the specified detail message.Constructor parameters in org.apache.commons.cli with type arguments of type OptionModifierConstructorDescriptionprivateCreates a command line.privateDefaultParser(boolean allowPartialMatching, Boolean stripLeadingAndTrailingQuotes, Consumer<Option> deprecatedHandler) Creates a new DefaultParser instance with the specified partial matching and quote stripping policy.privateHelpFormatter(Function<Option, String> deprecatedFormatFunction, PrintWriter printWriter, boolean showSince) Deprecated.Constructs a new instance. -
Uses of Option in org.apache.commons.cli.help
Fields in org.apache.commons.cli.help declared as OptionModifier and TypeFieldDescriptionprivate final OptionOptionFormatter.optionTheOptionbeing formatted.Fields in org.apache.commons.cli.help with type parameters of type OptionModifier and TypeFieldDescriptionprivate Comparator<Option> AbstractHelpFormatter.Builder.comparatorThe comparator to sort lists of optionsprivate final Comparator<Option> AbstractHelpFormatter.comparatorThe comparator for sortingOptioncollectionsOptionFormatter.COMPLEX_DEPRECATED_FORMATA function to display a deprecated option with a "Deprecated" prefix that displays all deprecation information.static final Comparator<Option> AbstractHelpFormatter.DEFAULT_COMPARATORThe default comparator forOptionimplementations.OptionFormatter.Builder.deprecatedFormatFunctionThe function to create the deprecated message for an optionOptionFormatter.deprecatedFormatFunctionThe function to display the deprecated option message.OptionFormatter.NO_DEPRECATED_FORMATA function to display a deprecated option with the "[Deprecated]" prefix.OptionFormatter.SIMPLE_DEPRECATED_FORMATA function to display a deprecated option with the "[Deprecated]" prefix.Methods in org.apache.commons.cli.help that return types with arguments of type OptionModifier and TypeMethodDescriptionprotected Comparator<Option> AbstractHelpFormatter.Builder.getComparator()Gets the comparator to sort lists of options.protected Comparator<Option> AbstractHelpFormatter.getComparator()Gets the comparator for sorting options.Creates a new list of options ordered by the comparator.Creates a new list of options ordered by the comparator.Methods in org.apache.commons.cli.help with parameters of type OptionModifier and TypeMethodDescriptionBuild an OptionFormatter to format the specified option.static OptionFormatterfinal OptionFormatterAbstractHelpFormatter.getOptionFormatter(Option option) Constructs anOptionFormatterfor the specifiedOption.Method parameters in org.apache.commons.cli.help with type arguments of type OptionModifier and TypeMethodDescriptionprotected abstract TableDefinitionAbstractHelpFormatter.getTableDefinition(Iterable<Option> options) Converts a collection ofOptions into aTableDefinition.HelpFormatter.getTableDefinition(Iterable<Option> options) Gets the table definition for the options.voidAbstractHelpFormatter.printHelp(String cmdLineSyntax, String header, Iterable<Option> options, String footer, boolean autoUsage) Prints the help forOptionswith the specified command line syntax.final voidAbstractHelpFormatter.printOptions(Iterable<Option> options) Prints the option table for a collection ofOptionobjects to theHelpAppendable.AbstractHelpFormatter.Builder.setComparator(Comparator<Option> comparator) Sets the comparator to use for sorting options.OptionFormatter.Builder.setDeprecatedFormatFunction(Function<Option, String> deprecatedFormatFunction) Specifies the function to construct the deprecated massage for the Option.Creates a new list of options ordered by the comparator.AbstractHelpFormatter.toSyntaxOptions(Iterable<Option> options) Return the string representation of the options as used in the syntax display.protected StringAbstractHelpFormatter.toSyntaxOptions(Iterable<Option> options, Function<Option, OptionGroup> lookup) Return the string representation of the options as used in the syntax display.protected StringAbstractHelpFormatter.toSyntaxOptions(Iterable<Option> options, Function<Option, OptionGroup> lookup) Return the string representation of the options as used in the syntax display.Constructors in org.apache.commons.cli.help with parameters of type OptionModifierConstructorDescriptionprivateOptionFormatter(Option option, OptionFormatter.Builder builder) An OptionFormatter applies formatting options to variousOptionattributes for textual display.
Option.Builder.get().