Package: org.apache.groovy.groovysh

## [Groovy] Class CommandSupport

- org.apache.groovy.groovysh.CommandSupport

- All Implemented Interfaces and Traits:
    CommandLine.Command

      abstract class CommandSupport
      extends Object
      implements CommandLine.Command

  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
    --- | ---
    `List` | `aliases` Standard aliases for the command.
    `boolean` | `hidden` Flag to indicate if the command should be hidden or not.
    `String` | `name` The name of the command.
    `String` | `shortcut` The shortcut switch

  - ### Constructor Summary

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

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `alias(String name, String shortcut)`
    `` | `protected void` | `assertNoArguments(List<String> args)`
    `` | `protected List<jline.console.completer.Completer>` | `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<String>` | `getBuffer()`
    `` | `protected BufferManager` | `getBuffers()`
    `` | `protected GroovyClassLoader` | `getClassLoader()`
    `` | `jline.console.completer.Completer` | `getCompleter()` Setup the Completer for the command.
    `` | `String` | `getDescription()`
    `` | `String` | `getHelp()`
    `` | `boolean` | `getHidden()`
    `` | `protected jline.console.history.FileHistory` | `getHistory()`
    `` | `protected List<String>` | `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

    - #### final List aliases

      Standard aliases for the command.

    - #### boolean hidden

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

    - #### final String name

      The name of the command.

    - #### final String shortcut

      The shortcut switch

  - ### Constructor Detail

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

  - ### Method Detail

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

    - #### protected void assertNoArguments(List<String> args)

    - #### protected List<jline.console.completer.Completer> createCompleters()

      Override to provide custom completion semantics for the command.

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

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

    - #### @Override
      List getAliases()

    - #### protected Binding getBinding()

    - #### protected List<String> getBuffer()

    - #### protected BufferManager getBuffers()

    - #### protected GroovyClassLoader getClassLoader()

    - #### @Override
      jline.console.completer.Completer getCompleter()

      Setup the Completer for the command.

    - #### @Override
      String getDescription()

    - #### @Override
      String getHelp()

    - #### @Override
      boolean getHidden()

    - #### protected jline.console.history.FileHistory getHistory()

    - #### protected List<String> getImports()

    - #### @Override
      String getName()

    - #### @Override
      String getShortcut()

    - #### @Override
      String getUsage()

    - #### protected Map getVariables()