Uses of Class
org.apache.commons.cli.Option
-
Packages that use Option Package Description org.apache.commons.cli Apache Commons CLI provides a simple API for presenting, processing, and validating a Command Line Interface.org.apache.commons.cli.help The help production system. -
-
Uses of Option in org.apache.commons.cli
Fields in org.apache.commons.cli declared as Option Modifier and Type Field Description protected OptionDefaultParser. currentOptionThe last option parsed.private OptionPosixParser. currentOptionDeprecated.Holder for the current option(package private) static Option[]Option. EMPTY_ARRAYEmpty array.private OptionAlreadySelectedException. optionThe option that triggered the exception.private OptionMissingArgumentException. optionThe option requiring additional argumentsFields in org.apache.commons.cli with type parameters of type Option Modifier and Type Field Description private static java.util.function.Function<Option,java.lang.String>HelpFormatter.Builder. DEFAULT_DEPRECATED_FORMATA function to convert a description (not null) and a deprecated Option (not null) to help description(package private) static java.util.function.Consumer<Option>CommandLine.Builder. DEPRECATED_HANDLERPrints an Option toSystem.out.private java.util.function.Function<Option,java.lang.String>HelpFormatter.Builder. deprecatedFormatFunctionFormatter for deprecated options.private java.util.function.Function<Option,java.lang.String>HelpFormatter. deprecatedFormatFunctionDeprecated.Function to format the description for a deprecated option.private java.util.function.Consumer<Option>CommandLine.Builder. deprecatedHandlerDeprecated Option handler.private java.util.function.Consumer<Option>CommandLine. deprecatedHandlerThe deprecated option handler.private java.util.function.Consumer<Option>DefaultParser.Builder. deprecatedHandlerThe deprecated option handler.private java.util.function.Consumer<Option>DefaultParser. deprecatedHandlerThe deprecated option handler.private java.util.Map<java.lang.String,Option>Options. longOptsA map of the options with the long keyprotected java.util.Comparator<Option>HelpFormatter. optionComparatorDeprecated.Comparator used to sort the options when they output in help text Defaults to case-insensitive alphabetical sorting by option keyprivate java.util.Map<java.lang.String,Option>OptionGroup. optionMapMaps options where keys are option name and values are the options.private java.util.List<Option>CommandLine.Builder. optionsThe processed optionsprivate java.util.List<Option>CommandLine. optionsThe processed optionsprivate java.util.Map<java.lang.String,Option>Options. shortOptsA map of the options with the character keyMethods in org.apache.commons.cli that return Option Modifier and Type Method Description OptionOption.Builder. build()Deprecated.UseOption.Builder.get().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 OptionOptionBuilder. create(java.lang.String opt)Deprecated.Creates an Option using the current settings and with the specified Optionchar.OptionOption.Builder. get()Constructs an Option with the values declared by thisOption.Builder.OptionAlreadySelectedException. getOption()Gets the option that was added to the group and triggered the exception.OptionMissingArgumentException. getOption()Gets the option requiring an argument that wasn't provided on the command line.OptionOptions. getOption(java.lang.String opt)Gets theOptionmatching the long or short name specified.Option[]CommandLine. getOptions()Gets an array of the processedOptions.private OptionCommandLine. resolveOption(java.lang.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 Option Modifier and Type Method Description java.util.Comparator<Option>HelpFormatter. getOptionComparator()Deprecated.Comparator used to sort the options when they output in help text.java.util.Collection<Option>OptionGroup. getOptions()Gets the options in this group as aCollection.java.util.Collection<Option>Options. getOptions()Gets 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.Methods in org.apache.commons.cli with parameters of type Option Modifier and Type Method Description protected voidCommandLine. addOption(Option option)Adds an option to the command line.CommandLine.BuilderCommandLine.Builder. addOption(Option option)Adds an option to the command line.OptionGroupOptionGroup. addOption(Option option)Adds the givenOptionto this group.OptionsOptions. addOption(Option opt)Adds an option instance.private voidHelpFormatter. appendOption(java.lang.StringBuilder buff, Option option, boolean required)Deprecated.Appends the usage clause for an Option to a StringBuffer.intHelpFormatter.OptionComparator. compare(Option opt1, Option opt2)Compares its two arguments for order.static java.lang.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.OptionGroupOptions. getOptionGroup(Option option)Gets the OptionGroup theoptbelongs to.java.util.PropertiesCommandLine. getOptionProperties(Option option)Gets the map of values associated to the option.java.lang.StringCommandLine. getOptionValue(Option option)Gets the first argument, if any, of this option.java.lang.StringCommandLine. getOptionValue(Option option, java.lang.String defaultValue)Gets the first argument, if any, of an option.java.lang.StringCommandLine. getOptionValue(Option option, java.util.function.Supplier<java.lang.String> defaultValue)Gets the first argument, if any, of an option.java.lang.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, java.util.function.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, java.util.function.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)booleanCommandLine. hasOption(Option option)Tests to see if an option has been set.voidParser. processArgs(Option opt, java.util.ListIterator<java.lang.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 Option Modifier and Type Method Description CommandLine.BuilderCommandLine.Builder. setDeprecatedHandler(java.util.function.Consumer<Option> deprecatedHandler)Sets the deprecated option handler.DefaultParser.BuilderDefaultParser.Builder. setDeprecatedHandler(java.util.function.Consumer<Option> deprecatedHandler)Sets the deprecated option handler.voidHelpFormatter. setOptionComparator(java.util.Comparator<Option> comparator)Deprecated.Sets the comparator used to sort the options when they output in help text.HelpFormatter.BuilderHelpFormatter.Builder. setShowDeprecated(java.util.function.Function<Option,java.lang.String> deprecatedFormatFunction)Sets whether to show deprecated options.Constructors in org.apache.commons.cli with parameters of type Option Constructor Description AlreadySelectedException(java.lang.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 Option Constructor Description CommandLine(java.util.List<java.lang.String> args, java.util.List<Option> options, java.util.function.Consumer<Option> deprecatedHandler)Creates a command line.DefaultParser(boolean allowPartialMatching, java.lang.Boolean stripLeadingAndTrailingQuotes, java.util.function.Consumer<Option> deprecatedHandler)Creates a new DefaultParser instance with the specified partial matching and quote stripping policy.HelpFormatter(java.util.function.Function<Option,java.lang.String> deprecatedFormatFunction, java.io.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 Option Modifier and Type Field Description private OptionOptionFormatter. optionTheOptionbeing formatted.Fields in org.apache.commons.cli.help with type parameters of type Option Modifier and Type Field Description private java.util.Comparator<Option>AbstractHelpFormatter.Builder. comparatorThe comparator to sort lists of optionsprivate java.util.Comparator<Option>AbstractHelpFormatter. comparatorThe comparator for sortingOptioncollectionsstatic java.util.function.Function<Option,java.lang.String>OptionFormatter. COMPLEX_DEPRECATED_FORMATA function to display a deprecated option with a "Deprecated" prefix that displays all deprecation information.static java.util.Comparator<Option>AbstractHelpFormatter. DEFAULT_COMPARATORThe default comparator forOptionimplementations.private java.util.function.Function<Option,java.lang.String>OptionFormatter.Builder. deprecatedFormatFunctionThe function to create the deprecated message for an optionprivate java.util.function.Function<Option,java.lang.String>OptionFormatter. deprecatedFormatFunctionThe function to display the deprecated option message.static java.util.function.Function<Option,java.lang.String>OptionFormatter. NO_DEPRECATED_FORMATA function to display a deprecated option with the "[Deprecated]" prefix.static java.util.function.Function<Option,java.lang.String>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 Option Modifier and Type Method Description protected java.util.Comparator<Option>AbstractHelpFormatter.Builder. getComparator()Gets the comparator to sort lists of options.protected java.util.Comparator<Option>AbstractHelpFormatter. getComparator()Gets the comparator for sorting options.java.util.List<Option>AbstractHelpFormatter. sort(java.lang.Iterable<Option> options)Creates a new list of options ordered by the comparator.java.util.List<Option>AbstractHelpFormatter. sort(Options options)Creates a new list of options ordered by the comparator.Methods in org.apache.commons.cli.help with parameters of type Option Modifier and Type Method Description OptionFormatterOptionFormatter.Builder. build(Option option)Build an OptionFormatter to format the specified option.static OptionFormatterOptionFormatter. from(Option option)OptionFormatterAbstractHelpFormatter. getOptionFormatter(Option option)Constructs anOptionFormatterfor the specifiedOption.Method parameters in org.apache.commons.cli.help with type arguments of type Option Modifier and Type Method Description protected abstract TableDefinitionAbstractHelpFormatter. getTableDefinition(java.lang.Iterable<Option> options)Converts a collection ofOptions into aTableDefinition.TableDefinitionHelpFormatter. getTableDefinition(java.lang.Iterable<Option> options)Gets the table definition for the options.voidAbstractHelpFormatter. printHelp(java.lang.String cmdLineSyntax, java.lang.String header, java.lang.Iterable<Option> options, java.lang.String footer, boolean autoUsage)Prints the help forOptionswith the specified command line syntax.voidAbstractHelpFormatter. printOptions(java.lang.Iterable<Option> options)Prints the option table for a collection ofOptionobjects to theHelpAppendable.BAbstractHelpFormatter.Builder. setComparator(java.util.Comparator<Option> comparator)Sets the comparator to use for sorting options.OptionFormatter.BuilderOptionFormatter.Builder. setDeprecatedFormatFunction(java.util.function.Function<Option,java.lang.String> deprecatedFormatFunction)Specifies the function to construct the deprecated massage for the Option.java.util.List<Option>AbstractHelpFormatter. sort(java.lang.Iterable<Option> options)Creates a new list of options ordered by the comparator.java.lang.StringAbstractHelpFormatter. toSyntaxOptions(java.lang.Iterable<Option> options)Return the string representation of the options as used in the syntax display.protected java.lang.StringAbstractHelpFormatter. toSyntaxOptions(java.lang.Iterable<Option> options, java.util.function.Function<Option,OptionGroup> lookup)Return the string representation of the options as used in the syntax display.protected java.lang.StringAbstractHelpFormatter. toSyntaxOptions(java.lang.Iterable<Option> options, java.util.function.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 Option Constructor Description OptionFormatter(Option option, OptionFormatter.Builder builder)An OptionFormatter applies formatting options to variousOptionattributes for textual display.
-