Package: org.apache.groovy.groovysh

## [Groovy] Class CommandSupport

- org.apache.groovy.groovysh.CommandSupport

- All Implemented Interfaces and Traits:
    Command

      abstract class CommandSupport
      extends Object

  Support for Command instances.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static String` | `NEWLINE` |
    `protected IO` | `io` | The I/O container for the command to spit stuff out.
    `protected Logger` | `log` | Instance logger for the command, initialized late to include the command name.
    `protected MessageSource` | `messages` | i18n message source for the command.
    `protected CommandRegistry` | `registry` | Provides the command instance with the registry, for aliasing support.
    `protected Groovysh` | `shell` | The owning shell.

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `private List` | `aliases` Standard aliases for the command.
    `private boolean` | `hidden` Flag to indicate if the command should be hidden or not.
    `private String` | `name` The name of the command.
    `private String` | `shortcut` The shortcut switch

  - ### Constructor Summary

    Constructors
    Constructor and description
    `protected CommandSupport (Groovysh shell, String name, String shortcut)`
    `CommandSupport ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `alias(String name, String shortcut)`
    `` | `protected void` | `assertNoArguments(List args)`
    `` | `protected List` | `createCompleters()` Override to provide custom completion semantics for the command.
    `` | `protected void` | `fail(String msg)`
    `` | `protected void` | `fail(String msg, Throwable cause)`
    `` | `List` | `getAliases()`
    `` | `protected Binding` | `getBinding()`
    `` | `protected List` | `getBuffer()`
    `` | `protected BufferManager` | `getBuffers()`
    `` | `protected GroovyClassLoader` | `getClassLoader()`
    `` | `Completer` | `getCompleter()` Setup the Completer for the command.
    `` | `String` | `getDescription()`
    `` | `String` | `getHelp()`
    `` | `boolean` | `getHidden()`
    `` | `protected FileHistory` | `getHistory()`
    `` | `protected List` | `getImports()`
    `` | `String` | `getName()`
    `` | `String` | `getShortcut()`
    `` | `String` | `getUsage()`
    `` | `protected Map` | `getVariables()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### protected static final String NEWLINE

    - #### protected final IO io

      The I/O container for the command to spit stuff out.

    - #### protected final Logger log

      Instance logger for the command, initialized late to include the command name.

    - #### protected final MessageSource messages

      i18n message source for the command.

    - #### protected CommandRegistry registry

      Provides the command instance with the registry, for aliasing support.

    - #### protected final Groovysh shell

      The owning shell.

  - ### Property Detail

    - #### private final List aliases

      Standard aliases for the command.

    - #### private boolean hidden

      Flag to indicate if the command should be hidden or not.

    - #### private final String name

      The name of the command.

    - #### private final String shortcut

      The shortcut switch

  - ### Constructor Detail

    - #### protected CommandSupport(Groovysh shell, String name, String shortcut)

    - #### CommandSupport()

  - ### Method Detail

    - #### protected void alias(String name, String shortcut)

    - #### protected void assertNoArguments(List args)

    - #### protected List createCompleters()

      Override to provide custom completion semantics for the command.

    - #### protected void fail(String msg)

    - #### protected void fail(String msg, Throwable cause)

    - #### @OverrideOverride List getAliases()

    - #### protected Binding getBinding()

    - #### protected List getBuffer()

    - #### protected BufferManager getBuffers()

    - #### protected GroovyClassLoader getClassLoader()

    - #### @OverrideOverride Completer getCompleter()

      Setup the Completer for the command.

    - #### @OverrideOverride String getDescription()

    - #### @OverrideOverride String getHelp()

    - #### @OverrideOverride boolean getHidden()

    - #### protected FileHistory getHistory()

    - #### protected List getImports()

    - #### @OverrideOverride String getName()

    - #### @OverrideOverride String getShortcut()

    - #### @OverrideOverride String getUsage()

    - #### protected Map getVariables()