Package: org.grails.cli.profile

## [Groovy] Class CommandDescription

- org.grails.cli.profile.CommandDescription

-     @groovy.transform.CompileStatic
      @groovy.transform.Canonical
      class CommandDescription
      extends java.lang.Object

  Describes a Command

  Authors:
    Graeme Rocher
  Since:
    3.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.util.Map<java.lang.String, CommandArgument>` | `arguments` |
    `private jline.console.completer.Completer` | `completer` | A completer for the command
    `private java.lang.String` | `description` | The description of the command
    `private java.util.Map<java.lang.String, CommandArgument>` | `flags` |
    `private java.lang.String` | `name` | The name of the command
    `private java.util.Collection<java.lang.String>` | `synonyms` | Any names that should also map to this command
    `private java.lang.String` | `usage` | The usage instructions for the command

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `jline.console.completer.Completer` | `completer` A completer for the command
    `java.lang.String` | `description` The description of the command
    `java.lang.String` | `name` The name of the command
    `java.util.Collection<java.lang.String>` | `synonyms` Any names that should also map to this command
    `java.lang.String` | `usage` The usage instructions for the command

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CommandDescription ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `CommandDescription` | `argument(java.util.Map args)` Adds an argument for the given named arguments
    `` | `CommandDescription` | `completer(java.lang.Class<jline.console.completer.Completer> completer)` Sets the completer
    `` | `CommandDescription` | `completer(jline.console.completer.Completer completer)` Sets the completer
    `` | `CommandDescription` | `flag(java.util.Map args)` Adds a flag for the given named arguments
    `` | `CommandArgument` | `getArgument(java.lang.String name)` Returns an argument for the given name or null if it doesn't exist
    `` | `java.util.Collection<CommandArgument>` | `getArguments()` Arguments to the command
    `` | `CommandArgument` | `getFlag(java.lang.String name)` Returns a flag for the given name or null if it doesn't exist
    `` | `java.util.Collection<CommandArgument>` | `getFlags()` Flags to the command.
    `` | `CommandDescription` | `synonyms(java.lang.String[] synonyms)` Adds a synonyms for this command

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private java.util.Map<java.lang.String, CommandArgument> arguments

    - #### private jline.console.completer.Completer completer

      A completer for the command

    - #### private java.lang.String description

      The description of the command

    - #### private java.util.Map<java.lang.String, CommandArgument> flags

    - #### private java.lang.String name

      The name of the command

    - #### private java.util.Collection<java.lang.String> synonyms

      Any names that should also map to this command

    - #### private java.lang.String usage

      The usage instructions for the command

  - ### Property Detail

    - #### jline.console.completer.Completer completer

      A completer for the command

    - #### java.lang.String description

      The description of the command

    - #### java.lang.String name

      The name of the command

    - #### java.util.Collection<java.lang.String> synonyms

      Any names that should also map to this command

    - #### java.lang.String usage

      The usage instructions for the command

  - ### Constructor Detail

    - #### CommandDescription()

  - ### Method Detail

    - #### @groovy.transform.CompileDynamic CommandDescription argument(java.util.Map args)

      Adds an argument for the given named arguments

      Parameters:
        `args` - The named arguments

    - #### CommandDescription completer(java.lang.Class<jline.console.completer.Completer> completer)

      Sets the completer

      Parameters:
        `completer` - The class of the completer to set
      Returns:
        The description instance

    - #### CommandDescription completer(jline.console.completer.Completer completer)

      Sets the completer

      Parameters:
        `completer` - The completer to set
      Returns:
        The description instance

    - #### @groovy.transform.CompileDynamic CommandDescription flag(java.util.Map args)

      Adds a flag for the given named arguments

      Parameters:
        `args` - The named arguments

    - #### CommandArgument getArgument(java.lang.String name)

      Returns an argument for the given name or null if it doesn't exist

      Parameters:
        `name` - The name
      Returns:
        The argument or null

    - #### java.util.Collection<CommandArgument> getArguments()

      Arguments to the command

    - #### CommandArgument getFlag(java.lang.String name)

      Returns a flag for the given name or null if it doesn't exist

      Parameters:
        `name` - The name
      Returns:
        The argument or null

    - #### java.util.Collection<CommandArgument> getFlags()

      Flags to the command. These differ as they are optional and are prefixed with a hyphen (Example -debug)

    - #### CommandDescription synonyms(java.lang.String[] synonyms)

      Adds a synonyms for this command

      Parameters:
        `synonyms` - The synonyms
      Returns:
        This command description