Groovy 2.2.0

org.codehaus.groovy.tools.shell
[Groovy] Class CommandSupport

java.lang.Object
  org.codehaus.groovy.tools.shell.CommandSupport
All Implemented Interfaces:
Command

abstract class CommandSupport

Support for Command instances.

Authors:
Jason Dillon
Version:
\$Id\$


Field Summary
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.

 
Property Summary
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
protected CommandSupport(Groovysh shell, String name, String shortcut)

 
Method Summary
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)

protected Binding getBinding()

protected List getBuffer()

protected BufferManager getBuffers()

protected GroovyClassLoader getClassLoader()

Completer getCompleter()

Setup the Completer for the command.

String getDescription()

String getHelp()

protected FileHistory getHistory()

protected List getImports()

String getUsage()

protected Map getVariables()

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

NEWLINE

protected static final String NEWLINE


io

protected final IO io
The I/O container for the command to spit stuff out.


log

protected final Logger log
Instance logger for the command, initialized late to include the command name.


messages

protected final MessageSource messages
i18n message source for the command.


registry

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


shell

protected final Groovysh shell
The owning shell.


 
Property Detail

aliases

final List aliases
Standard aliases for the command.


hidden

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


name

final String name
The name of the command.


shortcut

final String shortcut
The shortcut switch


 
Constructor Detail

CommandSupport

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


 
Method Detail

alias

protected void alias(String name, String shortcut)


assertNoArguments

protected void assertNoArguments(List args)


createCompleters

protected List createCompleters()
Override to provide custom completion semantics for the command.


fail

protected void fail(String msg)


fail

protected void fail(String msg, Throwable cause)


getBinding

protected Binding getBinding()


getBuffer

protected List getBuffer()


getBuffers

protected BufferManager getBuffers()


getClassLoader

protected GroovyClassLoader getClassLoader()


getCompleter

Completer getCompleter()
Setup the Completer for the command.


getDescription

String getDescription()


getHelp

String getHelp()


getHistory

protected FileHistory getHistory()


getImports

protected List getImports()


getUsage

String getUsage()


getVariables

protected Map getVariables()


 

Copyright © 2003-2013 The Codehaus. All rights reserved.