picocli

## Class CommandLine.Model.CommandSpec

- java.lang.Object
- - picocli.CommandLine.Model.CommandSpec

- Enclosing class:
    CommandLine.Model

      public static class CommandLine.Model.CommandSpec
      extends Object

  The `CommandSpec` class models a command specification, including the options, positional parameters and subcommands supported by the command, as well as attributes for the version help message and the usage help message of the command.

  Picocli views a command line application as a hierarchy of commands: there is a top-level command (usually the Java class with the `main` method) with optionally a set of command line options, positional parameters and subcommands. Subcommands themselves can have options, positional parameters and nested sub-subcommands to any level of depth.

  The object model has a corresponding hierarchy of `CommandSpec` objects, each with a set of `CommandLine.Model.OptionSpec`, `CommandLine.Model.PositionalParamSpec` and subcommands associated with it. This object model is used by the picocli command line interpreter and help message generator.

  Picocli can construct a `CommandSpec` automatically from classes with `@Command`, `@Option` and `@Parameters` annotations. Alternatively a `CommandSpec` can be constructed programmatically.

  Since:
    3.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CommandLine.Model.CommandSpec` | `add(CommandLine.Model.ArgSpec arg)` Adds the specified option spec or positional parameter spec to the list of configured arguments to expect.
    `CommandLine.Model.CommandSpec` | `addMethodSubcommands()` Reflects on the class of the user object and registers any command methods (class methods annotated with `@Command`) as subcommands.
    `CommandLine.Model.CommandSpec` | `addMethodSubcommands(CommandLine.IFactory factory)` Reflects on the class of the user object and registers any command methods (class methods annotated with `@Command`) as subcommands.
    `CommandLine.Model.CommandSpec` | `addMixin(String name, CommandLine.Model.CommandSpec mixin)` Adds the specified mixin `CommandSpec` object to the map of mixins for this command.
    `CommandLine.Model.CommandSpec` | `addOption(CommandLine.Model.OptionSpec option)` Adds the specified option spec to the list of configured arguments to expect.
    `CommandLine.Model.CommandSpec` | `addPositional(CommandLine.Model.PositionalParamSpec positional)` Adds the specified positional parameter spec to the list of configured arguments to expect.
    `CommandLine.Model.CommandSpec` | `addSubcommand(String name, CommandLine.Model.CommandSpec subcommand)` Adds the specified subcommand with the specified name.
    `CommandLine.Model.CommandSpec` | `addSubcommand(String name, CommandLine subCommandLine)` Adds the specified subcommand with the specified name.
    `CommandLine.Model.CommandSpec` | `addUnmatchedArgsBinding(CommandLine.Model.UnmatchedArgsBinding spec)` Adds the specified `UnmatchedArgsBinding` to the list of model objects to capture unmatched arguments for this command.
    `String[]` | `aliases()` Returns the alias command names of this subcommand.
    `CommandLine.Model.CommandSpec` | `aliases(String... aliases)` Sets the alternative names by which this subcommand is recognized on the command line.
    `List<CommandLine.Model.ArgSpec>` | `args()` Returns the list of all options and positional parameters configured for this command.
    `CommandLine` | `commandLine()` Returns the CommandLine constructed with this `CommandSpec` model.
    `protected CommandLine.Model.CommandSpec` | `commandLine(CommandLine commandLine)` Sets the CommandLine constructed with this `CommandSpec` model.
    `static CommandLine.Model.CommandSpec` | `create()` Creates and returns a new `CommandSpec` without any associated user object.
    `CommandLine.IDefaultValueProvider` | `defaultValueProvider()` Returns the default value provider for this command.
    `CommandLine.Model.CommandSpec` | `defaultValueProvider(CommandLine.IDefaultValueProvider defaultValueProvider)` Sets default value provider for this command.
    `CommandLine.Model.OptionSpec` | `findOption(char shortName)` Returns the option with the specified short name, or `null` if no option with that name is defined for this command.
    `CommandLine.Model.OptionSpec` | `findOption(String name)` Returns the option with the specified name, or `null` if no option with that name is defined for this command.
    `static CommandLine.Model.CommandSpec` | `forAnnotatedObject(Object userObject)` Creates and returns a new `CommandSpec` initialized from the specified associated user object.
    `static CommandLine.Model.CommandSpec` | `forAnnotatedObject(Object userObject, CommandLine.IFactory factory)` Creates and returns a new `CommandSpec` initialized from the specified associated user object.
    `static CommandLine.Model.CommandSpec` | `forAnnotatedObjectLenient(Object userObject)` Creates and returns a new `CommandSpec` initialized from the specified associated user object.
    `static CommandLine.Model.CommandSpec` | `forAnnotatedObjectLenient(Object userObject, CommandLine.IFactory factory)` Creates and returns a new `CommandSpec` initialized from the specified associated user object.
    `boolean` | `helpCommand()` Returns whether this subcommand is a help command, and required options and positional parameters of the parent command should not be validated.
    `CommandLine.Model.CommandSpec` | `helpCommand(boolean newValue)` Sets whether this is a help command and required parameter checking should be suspended.
    `Map<String,CommandLine.Model.CommandSpec>` | `mixins()` Returns a map of the mixin names to mixin `CommandSpec` objects configured for this command.
    `boolean` | `mixinStandardHelpOptions()` Returns `true` if the standard help options have been mixed in with this command, `false` otherwise.
    `CommandLine.Model.CommandSpec` | `mixinStandardHelpOptions(boolean newValue)` Sets whether the standard help options should be mixed in with this command.
    `String` | `name()` Returns name of this command.
    `CommandLine.Model.CommandSpec` | `name(String name)` Sets the String to use as the program name in the synopsis line of the help message.
    `Set<String>` | `names()` Returns all names of this command, including `name()` and `aliases()`.
    `List<CommandLine.Model.OptionSpec>` | `options()` Returns the list of options configured for this command.
    `Map<String,CommandLine.Model.OptionSpec>` | `optionsMap()` Returns a map of the option names to option spec objects configured for this command.
    `CommandLine.Model.CommandSpec` | `parent()` Returns the parent command of this subcommand, or `null` if this is a top-level command.
    `CommandLine.Model.CommandSpec` | `parent(CommandLine.Model.CommandSpec parent)` Sets the parent command of this subcommand.
    `CommandLine.Model.ParserSpec` | `parser()` Returns the parser specification for this command.
    `CommandLine.Model.CommandSpec` | `parser(CommandLine.Model.ParserSpec settings)` Initializes the parser specification for this command from the specified settings and returns this commandSpec.
    `List<CommandLine.Model.PositionalParamSpec>` | `positionalParameters()` Returns the list of positional parameters configured for this command.
    `Map<Character,CommandLine.Model.OptionSpec>` | `posixOptionsMap()` Returns a map of the short (single character) option names to option spec objects configured for this command.
    `String` | `qualifiedName()` Returns the String to use as the program name in the synopsis line of the help message: this command's `name`, preceded by the qualified name of the parent command, if any, separated by a space.
    `String` | `qualifiedName(String separator)` Returns this command's fully qualified name, which is its `name`, preceded by the qualified name of the parent command, if this command has a parent command.
    `List<CommandLine.Model.ArgSpec>` | `requiredArgs()` Returns the list of required options and positional parameters configured for this command.
    `ResourceBundle` | `resourceBundle()` Returns the resource bundle for this command.
    `CommandLine.Model.CommandSpec` | `resourceBundle(ResourceBundle bundle)` Initializes the resource bundle for this command: sets the `UsageMessageSpec.messages` to a `Messages` object created from this command spec and the specified bundle, and then sets the `ArgSpec.messages` of all options and positional parameters in this command to the same `Messages` instance.
    `Map<String,CommandLine>` | `subcommands()` Returns a read-only view of the subcommand map.
    `String` | `toString()` Returns a string representation of this command, used in error messages and trace messages.
    `List<CommandLine.Model.UnmatchedArgsBinding>` | `unmatchedArgsBindings()` Returns the list of `UnmatchedArgumentsBindings` configured for this command; each `UnmatchedArgsBinding` captures the arguments that could not be matched to any options or positional parameters.
    `CommandLine.Model.UsageMessageSpec` | `usageMessage()` Returns the usage help message specification for this command.
    `CommandLine.Model.CommandSpec` | `usageMessage(CommandLine.Model.UsageMessageSpec settings)` Initializes the usageMessage specification for this command from the specified settings and returns this commandSpec.
    `Object` | `userObject()` Returns the user object associated with this command.
    `String[]` | `version()` Returns version information for this command, to print to the console when the user specifies an option to request version help.
    `CommandLine.Model.CommandSpec` | `version(String... version)` Sets version information literals for this command, to print to the console when the user specifies an option to request version help.
    `CommandLine.IVersionProvider` | `versionProvider()` Returns the version provider for this command, to generate the `version()` strings.
    `CommandLine.Model.CommandSpec` | `versionProvider(CommandLine.IVersionProvider versionProvider)` Sets version provider for this command, to generate the `version()` strings.
    `CommandLine.Model.CommandSpec` | `withToString(String newValue)` Sets the string representation of this command, used in error messages and trace messages.
    `static CommandLine.Model.CommandSpec` | `wrapWithoutInspection(Object userObject)` Creates and returns a new `CommandSpec` with the specified associated user object.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static CommandLine.Model.CommandSpec create()

      Creates and returns a new `CommandSpec` without any associated user object.

    - #### wrapWithoutInspection

          public static CommandLine.Model.CommandSpec wrapWithoutInspection(Object userObject)

      Creates and returns a new `CommandSpec` with the specified associated user object. The specified user object is not inspected for annotations.
      Parameters:
        `userObject` - the associated user object. May be any object, may be `null`.

    - #### forAnnotatedObject

          public static CommandLine.Model.CommandSpec forAnnotatedObject(Object userObject)

      Creates and returns a new `CommandSpec` initialized from the specified associated user object. The specified user object must have at least one `CommandLine.Command`, `CommandLine.Option` or `CommandLine.Parameters` annotation.
      Parameters:
        `userObject` - the user object annotated with `CommandLine.Command`, `CommandLine.Option` and/or `CommandLine.Parameters` annotations.
      Throws:
        `CommandLine.InitializationException` - if the specified object has no picocli annotations or has invalid annotations

    - #### forAnnotatedObject

          public static CommandLine.Model.CommandSpec forAnnotatedObject(Object userObject,
                                                                         CommandLine.IFactory factory)

      Creates and returns a new `CommandSpec` initialized from the specified associated user object. The specified user object must have at least one `CommandLine.Command`, `CommandLine.Option` or `CommandLine.Parameters` annotation.
      Parameters:
        `userObject` - the user object annotated with `CommandLine.Command`, `CommandLine.Option` and/or `CommandLine.Parameters` annotations.
        `factory` - the factory used to create instances of subcommands, converters, etc., that are registered declaratively with annotation attributes
      Throws:
        `CommandLine.InitializationException` - if the specified object has no picocli annotations or has invalid annotations

    - #### forAnnotatedObjectLenient

          public static CommandLine.Model.CommandSpec forAnnotatedObjectLenient(Object userObject)

      Creates and returns a new `CommandSpec` initialized from the specified associated user object. If the specified user object has no `CommandLine.Command`, `CommandLine.Option` or `CommandLine.Parameters` annotations, an empty `CommandSpec` is returned.
      Parameters:
        `userObject` - the user object annotated with `CommandLine.Command`, `CommandLine.Option` and/or `CommandLine.Parameters` annotations.
      Throws:
        `CommandLine.InitializationException` - if the specified object has invalid annotations

    - #### forAnnotatedObjectLenient

          public static CommandLine.Model.CommandSpec forAnnotatedObjectLenient(Object userObject,
                                                                                CommandLine.IFactory factory)

      Creates and returns a new `CommandSpec` initialized from the specified associated user object. If the specified user object has no `CommandLine.Command`, `CommandLine.Option` or `CommandLine.Parameters` annotations, an empty `CommandSpec` is returned.
      Parameters:
        `userObject` - the user object annotated with `CommandLine.Command`, `CommandLine.Option` and/or `CommandLine.Parameters` annotations.
        `factory` - the factory used to create instances of subcommands, converters, etc., that are registered declaratively with annotation attributes
      Throws:
        `CommandLine.InitializationException` - if the specified object has invalid annotations

    - #### userObject

          public Object userObject()

      Returns the user object associated with this command.
      See Also:
        `CommandLine.getCommand()`

    - #### commandLine

          public CommandLine commandLine()

      Returns the CommandLine constructed with this `CommandSpec` model.

    - #### commandLine

          protected CommandLine.Model.CommandSpec commandLine(CommandLine commandLine)

      Sets the CommandLine constructed with this `CommandSpec` model.

    - #### parser

          public CommandLine.Model.ParserSpec parser()

      Returns the parser specification for this command.

    - #### parser

          public CommandLine.Model.CommandSpec parser(CommandLine.Model.ParserSpec settings)

      Initializes the parser specification for this command from the specified settings and returns this commandSpec.

    - #### usageMessage

          public CommandLine.Model.UsageMessageSpec usageMessage()

      Returns the usage help message specification for this command.

    - #### usageMessage

          public CommandLine.Model.CommandSpec usageMessage(CommandLine.Model.UsageMessageSpec settings)

      Initializes the usageMessage specification for this command from the specified settings and returns this commandSpec.

    - #### resourceBundle

          public ResourceBundle resourceBundle()

      Returns the resource bundle for this command.
      Returns:
        the resource bundle from the CommandLine.Model.UsageMessageSpec.messages()
      Since:
        3.6

    - #### resourceBundle

          public CommandLine.Model.CommandSpec resourceBundle(ResourceBundle bundle)

      Initializes the resource bundle for this command: sets the `UsageMessageSpec.messages` to a `Messages` object created from this command spec and the specified bundle, and then sets the `ArgSpec.messages` of all options and positional parameters in this command to the same `Messages` instance. Subcommands are not modified.
      Parameters:
        `bundle` - the ResourceBundle to set, may be `null`
      Returns:
        this commandSpec
      Since:
        3.6
      See Also:
        `addSubcommand(String, CommandLine)`

    - #### subcommands

          public Map<String,CommandLine> subcommands()

      Returns a read-only view of the subcommand map.

    - #### addSubcommand

          public CommandLine.Model.CommandSpec addSubcommand(String name,
                                                             CommandLine.Model.CommandSpec subcommand)

      Adds the specified subcommand with the specified name. If the specified subcommand does not have a ResourceBundle set, it is initialized to the ResourceBundle of this command spec.
      Parameters:
        `name` - subcommand name - when this String is encountered in the command line arguments the subcommand is invoked
        `subcommand` - describes the subcommand to envoke when the name is encountered on the command line
      Returns:
        this `CommandSpec` object for method chaining

    - #### addSubcommand

          public CommandLine.Model.CommandSpec addSubcommand(String name,
                                                             CommandLine subCommandLine)

      Adds the specified subcommand with the specified name. If the specified subcommand does not have a ResourceBundle set, it is initialized to the ResourceBundle of this command spec.
      Parameters:
        `name` - subcommand name - when this String is encountered in the command line arguments the subcommand is invoked
        `subCommandLine` - the subcommand to envoke when the name is encountered on the command line
      Returns:
        this `CommandSpec` object for method chaining

    - #### addMethodSubcommands

          public CommandLine.Model.CommandSpec addMethodSubcommands()

      Reflects on the class of the user object and registers any command methods (class methods annotated with `@Command`) as subcommands.
      Returns:
        this `CommandLine.Model.CommandSpec` object for method chaining
      Since:
        3.6.0
      See Also:
        `#addMethodSubcommands(IFactory)`, `addSubcommand(String, CommandLine)`

    - #### addMethodSubcommands

          public CommandLine.Model.CommandSpec addMethodSubcommands(CommandLine.IFactory factory)

      Reflects on the class of the user object and registers any command methods (class methods annotated with `@Command`) as subcommands.
      Parameters:
        `factory` - the factory used to create instances of subcommands, converters, etc., that are registered declaratively with annotation attributes
      Returns:
        this `CommandLine.Model.CommandSpec` object for method chaining
      Since:
        3.7.0
      See Also:
        `addSubcommand(String, CommandLine)`

    - #### parent

          public CommandLine.Model.CommandSpec parent()

      Returns the parent command of this subcommand, or `null` if this is a top-level command.

    - #### parent

          public CommandLine.Model.CommandSpec parent(CommandLine.Model.CommandSpec parent)

      Sets the parent command of this subcommand.
      Returns:
        this CommandSpec for method chaining

    - #### add

          public CommandLine.Model.CommandSpec add(CommandLine.Model.ArgSpec arg)

      Adds the specified option spec or positional parameter spec to the list of configured arguments to expect.
      Parameters:
        `arg` - the option spec or positional parameter spec to add
      Returns:
        this CommandSpec for method chaining

    - #### addOption

          public CommandLine.Model.CommandSpec addOption(CommandLine.Model.OptionSpec option)

      Adds the specified option spec to the list of configured arguments to expect. The option's CommandLine.Model.OptionSpec.description() may now return Strings from this CommandSpec's messages. The option parameter's CommandLine.Model.ArgSpec.defaultValueString() may now return Strings from this CommandSpec's `defaultValueProvider()` IDefaultValueProvider}.
      Parameters:
        `option` - the option spec to add
      Returns:
        this CommandSpec for method chaining
      Throws:
        `CommandLine.DuplicateOptionAnnotationsException` - if any of the names of the specified option is the same as the name of another option

    - #### addPositional

          public CommandLine.Model.CommandSpec addPositional(CommandLine.Model.PositionalParamSpec positional)

      Adds the specified positional parameter spec to the list of configured arguments to expect. The positional parameter's CommandLine.Model.PositionalParamSpec.description() may now return Strings from this CommandSpec's messages. The positional parameter's CommandLine.Model.ArgSpec.defaultValueString() may now return Strings from this CommandSpec's `defaultValueProvider()` IDefaultValueProvider}.
      Parameters:
        `positional` - the positional parameter spec to add
      Returns:
        this CommandSpec for method chaining

    - #### addMixin

          public CommandLine.Model.CommandSpec addMixin(String name,
                                                        CommandLine.Model.CommandSpec mixin)

      Adds the specified mixin `CommandSpec` object to the map of mixins for this command.
      Parameters:
        `name` - the name that can be used to later retrieve the mixin
        `mixin` - the mixin whose options and positional parameters and other attributes to add to this command
      Returns:
        this CommandSpec for method chaining

    - #### addUnmatchedArgsBinding

          public CommandLine.Model.CommandSpec addUnmatchedArgsBinding(CommandLine.Model.UnmatchedArgsBinding spec)

      Adds the specified `UnmatchedArgsBinding` to the list of model objects to capture unmatched arguments for this command.
      Parameters:
        `spec` - the unmatched arguments binding to capture unmatched arguments
      Returns:
        this CommandSpec for method chaining

    - #### mixins

          public Map<String,CommandLine.Model.CommandSpec> mixins()

      Returns a map of the mixin names to mixin `CommandSpec` objects configured for this command.
      Returns:
        an immutable map of mixins added to this command.

    - #### options

          public List<CommandLine.Model.OptionSpec> options()

      Returns the list of options configured for this command.
      Returns:
        an immutable list of options that this command recognizes.

    - #### positionalParameters

          public List<CommandLine.Model.PositionalParamSpec> positionalParameters()

      Returns the list of positional parameters configured for this command.
      Returns:
        an immutable list of positional parameters that this command recognizes.

    - #### optionsMap

          public Map<String,CommandLine.Model.OptionSpec> optionsMap()

      Returns a map of the option names to option spec objects configured for this command.
      Returns:
        an immutable map of options that this command recognizes.

    - #### posixOptionsMap

          public Map<Character,CommandLine.Model.OptionSpec> posixOptionsMap()

      Returns a map of the short (single character) option names to option spec objects configured for this command.
      Returns:
        an immutable map of options that this command recognizes.

    - #### requiredArgs

          public List<CommandLine.Model.ArgSpec> requiredArgs()

      Returns the list of required options and positional parameters configured for this command.
      Returns:
        an immutable list of the required options and positional parameters for this command.

    - #### unmatchedArgsBindings

          public List<CommandLine.Model.UnmatchedArgsBinding> unmatchedArgsBindings()

      Returns the list of `UnmatchedArgumentsBindings` configured for this command; each `UnmatchedArgsBinding` captures the arguments that could not be matched to any options or positional parameters.

    - #### name

          public String name()

      Returns name of this command. Used in the synopsis line of the help message. `DEFAULT_COMMAND_NAME` by default, initialized from `CommandLine.Command.name()` if defined.
      See Also:
        `qualifiedName()`

    - #### aliases

          public String[] aliases()

      Returns the alias command names of this subcommand.
      Since:
        3.1

    - #### names

          public Set<String> names()

      Returns all names of this command, including `name()` and `aliases()`.
      Since:
        3.9

    - #### args

          public List<CommandLine.Model.ArgSpec> args()

      Returns the list of all options and positional parameters configured for this command.
      Returns:
        an immutable list of all options and positional parameters for this command.

    - #### qualifiedName

          public String qualifiedName()

      Returns the String to use as the program name in the synopsis line of the help message: this command's `name`, preceded by the qualified name of the parent command, if any, separated by a space.
      Returns:
        `DEFAULT_COMMAND_NAME` by default, initialized from `CommandLine.Command.name()` and the parent command if defined.
      Since:
        3.0.1

    - #### qualifiedName

          public String qualifiedName(String separator)

      Returns this command's fully qualified name, which is its `name`, preceded by the qualified name of the parent command, if this command has a parent command.
      Parameters:
        `separator` - the string to put between the names of the commands in the hierarchy
      Returns:
        `DEFAULT_COMMAND_NAME` by default, initialized from `CommandLine.Command.name()` and the parent command if any.
      Since:
        3.6

    - #### version

          public String[] version()

      Returns version information for this command, to print to the console when the user specifies an option to request version help. This is not part of the usage help message.
      Returns:
        the version strings generated by the `version provider` if one is set, otherwise the version literals

    - #### versionProvider

          public CommandLine.IVersionProvider versionProvider()

      Returns the version provider for this command, to generate the `version()` strings.
      Returns:
        the version provider or `null` if the version strings should be returned from the version literals.

    - #### helpCommand

          public boolean helpCommand()

      Returns whether this subcommand is a help command, and required options and positional parameters of the parent command should not be validated.
      Returns:
        `true` if this subcommand is a help command and picocli should not check for missing required options and positional parameters on the parent command
      See Also:
        `CommandLine.Command.helpCommand()`

    - #### mixinStandardHelpOptions

          public boolean mixinStandardHelpOptions()

      Returns `true` if the standard help options have been mixed in with this command, `false` otherwise.

    - #### toString

          public String toString()

      Returns a string representation of this command, used in error messages and trace messages.
      Overrides:
        `toString` in class `Object`

    - #### name

          public CommandLine.Model.CommandSpec name(String name)

      Sets the String to use as the program name in the synopsis line of the help message.
      Returns:
        this CommandSpec for method chaining

    - #### aliases

          public CommandLine.Model.CommandSpec aliases(String... aliases)

      Sets the alternative names by which this subcommand is recognized on the command line.
      Returns:
        this CommandSpec for method chaining
      Since:
        3.1

    - #### defaultValueProvider

          public CommandLine.IDefaultValueProvider defaultValueProvider()

      Returns the default value provider for this command.
      Returns:
        the default value provider or `null`
      Since:
        3.6

    - #### defaultValueProvider

          public CommandLine.Model.CommandSpec defaultValueProvider(CommandLine.IDefaultValueProvider defaultValueProvider)

      Sets default value provider for this command.
      Parameters:
        `defaultValueProvider` - the default value provider to use, or `null`.
      Returns:
        this CommandSpec for method chaining
      Since:
        3.6

    - #### version

          public CommandLine.Model.CommandSpec version(String... version)

      Sets version information literals for this command, to print to the console when the user specifies an option to request version help. Only used if no `versionProvider` is set.
      Returns:
        this CommandSpec for method chaining

    - #### versionProvider

          public CommandLine.Model.CommandSpec versionProvider(CommandLine.IVersionProvider versionProvider)

      Sets version provider for this command, to generate the `version()` strings.
      Parameters:
        `versionProvider` - the version provider to use to generate the version strings, or `null` if the version literals should be used.
      Returns:
        this CommandSpec for method chaining

    - #### helpCommand

          public CommandLine.Model.CommandSpec helpCommand(boolean newValue)

      Sets whether this is a help command and required parameter checking should be suspended.
      Returns:
        this CommandSpec for method chaining
      See Also:
        `CommandLine.Command.helpCommand()`

    - #### mixinStandardHelpOptions

          public CommandLine.Model.CommandSpec mixinStandardHelpOptions(boolean newValue)

      Sets whether the standard help options should be mixed in with this command.
      Returns:
        this CommandSpec for method chaining
      See Also:
        `CommandLine.Command.mixinStandardHelpOptions()`

    - #### withToString

          public CommandLine.Model.CommandSpec withToString(String newValue)

      Sets the string representation of this command, used in error messages and trace messages.
      Parameters:
        `newValue` - the string representation
      Returns:
        this CommandSpec for method chaining

    - #### findOption

          public CommandLine.Model.OptionSpec findOption(char shortName)

      Returns the option with the specified short name, or `null` if no option with that name is defined for this command.

    - #### findOption

          public CommandLine.Model.OptionSpec findOption(String name)

      Returns the option with the specified name, or `null` if no option with that name is defined for this command.
      Parameters:
        `name` - used to search the options. May include option name prefix characters or not.

Copyright © 2019. All rights reserved.