Uses of Class
picocli.CommandLine.Model.OptionSpec
-
Uses of CommandLine.Model.OptionSpec in picocli
Fields in picocli declared as CommandLine.Model.OptionSpecFields in picocli with type parameters of type CommandLine.Model.OptionSpecModifier and TypeFieldDescriptionprivate final List
<CommandLine.Model.OptionSpec> CommandLine.ParseResult.matchedOptions
private final List
<CommandLine.Model.OptionSpec> CommandLine.ParseResult.Builder.matchedOptionsList
private final Set
<CommandLine.Model.OptionSpec> CommandLine.ParseResult.matchedUniqueOptions
CommandLine.Model.CommandSpec.negatedOptionsByNameMap
private final List
<CommandLine.Model.OptionSpec> CommandLine.Model.CommandSpec.options
private final Set
<CommandLine.Model.OptionSpec> CommandLine.ParseResult.Builder.options
CommandLine.Model.CommandSpec.optionsByNameMap
CommandLine.Model.CommandSpec.posixOptionsByKeyMap
Methods in picocli that return CommandLine.Model.OptionSpecModifier and TypeMethodDescriptionCommandLine.Model.OptionSpec.Builder.build()
Returns a validOptionSpec
instance.private CommandLine.Model.OptionSpec
CommandLine.Help.createEndOfOptionsOption
(String name) CommandLine.Model.CommandSpec.findOption
(char shortName) Returns the option with the specified short name, ornull
if no option with that name is defined for this command.(package private) static CommandLine.Model.OptionSpec
CommandLine.Model.CommandSpec.findOption
(char shortName, Iterable<CommandLine.Model.OptionSpec> options) CommandLine.Model.CommandSpec.findOption
(String name) Returns the option with the specified name, ornull
if no option with that name is defined for this command.(package private) static CommandLine.Model.OptionSpec
CommandLine.Model.CommandSpec.findOption
(String name, List<CommandLine.Model.OptionSpec> options) CommandLine.ParseResult.matchedOption
(char shortName) Returns the option with the specified short name, ornull
if no option with that name was matched on the command line.CommandLine.ParseResult.matchedOption
(String name) Returns the option with the specified name, ornull
if no option with that name was matched on the command line.Methods in picocli that return types with arguments of type CommandLine.Model.OptionSpecModifier and TypeMethodDescriptionprivate List
<CommandLine.Model.OptionSpec> CommandLine.Model.ArgGroupSpec.addGroupOptionsToListRecursively
(List<CommandLine.Model.OptionSpec> result) CommandLine.Model.ArgGroupSpec.allOptionsNested()
Returns all options configured for this group and all subgroups.CommandLine.Help.createDefaultOptionSort()
Returns a comparator for sorting options, ornull
, depending on the settings for this command.(package private) static Comparator
<CommandLine.Model.OptionSpec> CommandLine.Help.createOrderComparator()
private static Comparator
<CommandLine.Model.OptionSpec> CommandLine.Help.createOrderComparatorIfNecessary
(List<CommandLine.Model.OptionSpec> options) CommandLine.Help.createShortOptionArityAndNameComparator()
CommandLine.Help.createShortOptionNameComparator()
SortsOptionSpecs
by their option name in case-insensitive alphabetic order.private List
<CommandLine.Model.OptionSpec> CommandLine.Help.excludeHiddenAndGroupOptions
(List<CommandLine.Model.OptionSpec> all) CommandLine.ParseResult.matchedOptions()
Returns a list of matched options, in order they were matched on the command line.CommandLine.ParseResult.matchedOptionsSet()
Returns a set of matched options.CommandLine.Model.CommandSpec.negatedOptionsMap()
Returns a map of the negated option names to option spec objects configured for this command.(package private) List
<CommandLine.Model.OptionSpec> CommandLine.Help.options()
CommandLine.Model.ArgGroupSpec.options()
Returns the list of options configured for this group.CommandLine.Model.CommandSpec.options()
Returns the list of options configured for this command.CommandLine.Model.CommandSpec.optionsMap()
Returns a map of the option names to option spec objects configured for this command.CommandLine.Model.CommandSpec.posixOptionsMap()
Returns a map of the short (single character) option names to option spec objects configured for this command.Methods in picocli with parameters of type CommandLine.Model.OptionSpecModifier and TypeMethodDescriptionprivate static void
AutoComplete.addCandidatesForArgsFollowing
(CommandLine.Model.OptionSpec optionSpec, List<CharSequence> candidates) void
CommandLine.Help.Layout.addOption
(CommandLine.Model.OptionSpec option, CommandLine.Help.IParamLabelRenderer paramLabelRenderer) Delegates to theoption renderer
of this layout to obtain text values for the specifiedCommandLine.Model.OptionSpec
, and then calls theCommandLine.Help.Layout.layout(CommandLine.Model.ArgSpec, CommandLine.Help.Ansi.Text[][])
method to write these text values into the correct cells in the TextTable.CommandLine.Model.CommandSpec.addOption
(CommandLine.Model.OptionSpec option) Adds the specified option spec to the list of configured arguments to expect.CommandLine.ParseResult.Builder.addOption
(CommandLine.Model.OptionSpec option) Adds the specifiedOptionSpec
to the list of options that were matched on the command line.private void
CommandLine.Model.CommandSpec.addOptionNegative
(CommandLine.Model.OptionSpec option, CommandLine.Tracer tracer) CommandLine.Model.OptionSpec.builder
(CommandLine.Model.OptionSpec original) Returns a Builder initialized from the specifiedOptionSpec
.int
CommandLine.Help.SortByOptionArityAndNameAlphabetically.compare
(CommandLine.Model.OptionSpec o1, CommandLine.Model.OptionSpec o2) int
CommandLine.Help.SortByShortestOptionNameAlphabetically.compare
(CommandLine.Model.OptionSpec o1, CommandLine.Model.OptionSpec o2) (package private) static CommandLine.Help.Ansi.Text
CommandLine.Help.concatOptionText
(String prefix, CommandLine.Help.Ansi.Text text, CommandLine.Help.ColorScheme colorScheme, CommandLine.Model.OptionSpec option, CommandLine.Help.IParamLabelRenderer parameterLabelRenderer) private CommandLine.Help.Ansi.Text
CommandLine.Model.ArgGroupSpec.concatOptionText
(String prefix, CommandLine.Help.Ansi.Text text, CommandLine.Help.ColorScheme colorScheme, CommandLine.Model.OptionSpec option) private CommandLine.Help.Ansi.Text
CommandLine.Help.DefaultOptionRenderer.createLongOptionText
(CommandLine.Model.OptionSpec option, CommandLine.Help.IParamLabelRenderer renderer, CommandLine.Help.ColorScheme scheme, String longOption) private static CommandLine.Model.CommandSpec
AutoComplete.findCommandFor
(CommandLine.Model.OptionSpec option, CommandLine.Model.CommandSpec commandSpec) private static void
AutoComplete.generateCompletionCandidates
(StringBuilder buff, CommandLine.Model.OptionSpec f) boolean
CommandLine.ParseResult.hasMatchedOption
(CommandLine.Model.OptionSpec option) Returns whether the specified option was matched on the command line.private <T> T
CommandLine.ParseResult.matchedOptionValue
(CommandLine.Model.OptionSpec option, T defaultValue) Returns the command line argument value of the specified option, converted to the type of the option, or the specified default value if the specified option isnull
.private String
CommandLine.PropertiesDefaultProvider.optionDefaultValue
(CommandLine.Model.OptionSpec option) CommandLine.Help.DefaultOptionRenderer.render
(CommandLine.Model.OptionSpec option, CommandLine.Help.IParamLabelRenderer paramLabelRenderer, CommandLine.Help.ColorScheme scheme) CommandLine.Help.IOptionRenderer.render
(CommandLine.Model.OptionSpec option, CommandLine.Help.IParamLabelRenderer parameterLabelRenderer, CommandLine.Help.ColorScheme scheme) Returns a text representation of the specified option and its parameter(s) if any.CommandLine.Help.MinimalOptionRenderer.render
(CommandLine.Model.OptionSpec option, CommandLine.Help.IParamLabelRenderer parameterLabelRenderer, CommandLine.Help.ColorScheme scheme) private CommandLine.Help.Ansi.Text[][]
CommandLine.Help.DefaultOptionRenderer.renderDescriptionLines
(CommandLine.Model.OptionSpec option, CommandLine.Help.ColorScheme scheme, String requiredOption, String shortOption, CommandLine.Help.Ansi.Text longOptionText) Method parameters in picocli with type arguments of type CommandLine.Model.OptionSpecModifier and TypeMethodDescriptionvoid
CommandLine.Help.Layout.addAllOptions
(List<CommandLine.Model.OptionSpec> options, CommandLine.Help.IParamLabelRenderer paramLabelRenderer) CallsCommandLine.Help.Layout.addOption(CommandLine.Model.OptionSpec, CommandLine.Help.IParamLabelRenderer)
for all Options in the specified list.private CommandLine.Model.CommandSpec
CommandLine.Model.CommandSpec.addArgGroup
(CommandLine.Model.ArgGroupSpec group, Set<CommandLine.Model.OptionSpec> groupOptions, Set<CommandLine.Model.PositionalParamSpec> groupPositionals) private void
CommandLine.Model.CommandSpec.addGroupArgsToCommand
(CommandLine.Model.ArgGroupSpec group, Map<String, CommandLine.Model.ArgGroupSpec> added, Set<CommandLine.Model.OptionSpec> groupOptions, Set<CommandLine.Model.PositionalParamSpec> groupPositionals) private List
<CommandLine.Model.OptionSpec> CommandLine.Model.ArgGroupSpec.addGroupOptionsToListRecursively
(List<CommandLine.Model.OptionSpec> result) void
CommandLine.Help.Layout.addOptions
(List<CommandLine.Model.OptionSpec> options, CommandLine.Help.IParamLabelRenderer paramLabelRenderer) CallsCommandLine.Help.Layout.addOption(CommandLine.Model.OptionSpec, CommandLine.Help.IParamLabelRenderer)
for all non-hidden Options in the list.int
CommandLine.Help.calcLongOptionColumnWidth
(List<CommandLine.Model.OptionSpec> options, List<CommandLine.Model.PositionalParamSpec> positionals, CommandLine.Help.ColorScheme aColorScheme) Returns the width of the long options column in the usage help message.CommandLine.Help.createDefaultLayout
(List<CommandLine.Model.OptionSpec> options, List<CommandLine.Model.PositionalParamSpec> positionals, CommandLine.Help.ColorScheme aColorScheme) Returns aLayout
instance configured with the user preferences captured in this Help instance.protected CommandLine.Help.Ansi.Text
CommandLine.Help.createDetailedSynopsisOptionsText
(Collection<CommandLine.Model.ArgSpec> done, Comparator<CommandLine.Model.OptionSpec> optionSort, boolean clusterBooleanOptions) Returns a Text object containing a partial detailed synopsis showing only the options, starting with a" "
space.protected CommandLine.Help.Ansi.Text
CommandLine.Help.createDetailedSynopsisOptionsText
(Collection<CommandLine.Model.ArgSpec> done, List<CommandLine.Model.OptionSpec> optionList, Comparator<CommandLine.Model.OptionSpec> optionSort, boolean clusterBooleanOptions) Returns a Text object containing a partial detailed synopsis showing only the specified options, starting with a" "
space.protected CommandLine.Help.Ansi.Text
CommandLine.Help.createDetailedSynopsisOptionsText
(Collection<CommandLine.Model.ArgSpec> done, List<CommandLine.Model.OptionSpec> optionList, Comparator<CommandLine.Model.OptionSpec> optionSort, boolean clusterBooleanOptions) Returns a Text object containing a partial detailed synopsis showing only the specified options, starting with a" "
space.private static Comparator
<CommandLine.Model.OptionSpec> CommandLine.Help.createOrderComparatorIfNecessary
(List<CommandLine.Model.OptionSpec> options) CommandLine.Help.detailedSynopsis
(int synopsisHeadingLength, Comparator<CommandLine.Model.OptionSpec> optionSort, boolean clusterBooleanOptions) Generates a detailed synopsis message showing all options and parameters.CommandLine.Help.detailedSynopsis
(Comparator<CommandLine.Model.OptionSpec> optionSort, boolean clusterBooleanOptions) Deprecated.private List
<CommandLine.Model.OptionSpec> CommandLine.Help.excludeHiddenAndGroupOptions
(List<CommandLine.Model.OptionSpec> all) (package private) static CommandLine.Model.OptionSpec
CommandLine.Model.CommandSpec.findOption
(char shortName, Iterable<CommandLine.Model.OptionSpec> options) (package private) static CommandLine.Model.OptionSpec
CommandLine.Model.CommandSpec.findOption
(String name, List<CommandLine.Model.OptionSpec> options) private static String
AutoComplete.generateOptionsCases
(List<CommandLine.Model.OptionSpec> argOptionFields, String indent, String currWord) private static String
AutoComplete.generateOptionsSwitch
(List<CommandLine.Model.OptionSpec> argOptions) CommandLine.Help.optionList
(CommandLine.Help.Layout layout, Comparator<CommandLine.Model.OptionSpec> optionSort, CommandLine.Help.IParamLabelRenderer valueLabelRenderer) Sorts allOptions
with the specifiedcomparator
(if the comparator is non-null
), then adds all non-hidden options to the specified TextTable and returns the result of TextTable.toString().CommandLine.Help.optionListExcludingGroups
(List<CommandLine.Model.OptionSpec> options) Returns a description of the specified list of options.CommandLine.Help.optionListExcludingGroups
(List<CommandLine.Model.OptionSpec> optionList, CommandLine.Help.Layout layout, Comparator<CommandLine.Model.OptionSpec> optionSort, CommandLine.Help.IParamLabelRenderer valueLabelRenderer) Sorts allOptions
with the specifiedcomparator
(if the comparator is non-null
), then adds the specified options to the specified TextTable and returns the result of TextTable.toString().CommandLine.Help.optionListExcludingGroups
(List<CommandLine.Model.OptionSpec> optionList, CommandLine.Help.Layout layout, Comparator<CommandLine.Model.OptionSpec> optionSort, CommandLine.Help.IParamLabelRenderer valueLabelRenderer) Sorts allOptions
with the specifiedcomparator
(if the comparator is non-null
), then adds the specified options to the specified TextTable and returns the result of TextTable.toString().private String
CommandLine.Help.optionListGroupSections
(List<CommandLine.Model.ArgGroupSpec> groupList, Comparator<CommandLine.Model.OptionSpec> optionSort, CommandLine.Help.IParamLabelRenderer paramLabelRenderer) private static String
AutoComplete.optionNames
(List<CommandLine.Model.OptionSpec> options) private static <T> int
CommandLine.Model.CommandSpec.remove
(CommandLine.Model.ArgSpec arg, Map<T, CommandLine.Model.OptionSpec> map) Constructors in picocli with parameters of type CommandLine.Model.OptionSpec
CommandLine.Help.detailedSynopsis(int, Comparator, boolean)
instead.