[Groovy] Class CommandSupport
- org.codehaus.groovy.tools.shell.CommandSupport
- All Implemented Interfaces and Traits:
- Command
abstract class CommandSupport
Support for Command instances.
Field Summary
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
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
Constructor and description |
---|
protected CommandSupport
(Groovysh shell, String name, String shortcut) |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
protected void |
alias(String name, String shortcut) | |
protected void |
assertNoArguments(List<String> args) | |
protected List<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() | |
Completer |
getCompleter() Setup the Completer for the command. | |
String |
getDescription() | |
String |
getHelp() | |
boolean |
getHidden() | |
protected FileHistory |
getHistory() | |
protected List<String> |
getImports() | |
String |
getName() | |
String |
getShortcut() | |
String |
getUsage() | |
protected Map |
getVariables() |
Inherited Methods Summary
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<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 Completer getCompleter()
Setup the Completer for the command.
@Override String getDescription()
@Override String getHelp()
@Override boolean getHidden()
protected FileHistory getHistory()
protected List<String> getImports()
@Override String getName()
@Override String getShortcut()
@Override String getUsage()
protected Map getVariables()
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.5.14/html/gapi/org/codehaus/groovy/tools/shell/CommandSupport.html