|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.lang.Script
org.crsh.shell.impl.GroovyScriptCommand
public abstract class GroovyScriptCommand
This class provides the base class for Groovy scripts. It should not be used directly as it is rather used
for configuring a Groovy CompilerConfiguration.setScriptBaseClass(String) class.
| Constructor Summary | |
|---|---|
GroovyScriptCommand()
|
|
| Method Summary | |
|---|---|
Map<String,String> |
complete(CommandContext context,
String line)
Provide completions for the specified arguments. |
CommandInvoker<?,?> |
createInvoker(String line)
Provides an invoker for the specified arguments. |
String |
describe(String line,
DescriptionMode mode)
Returns a description of the command or null if none can be found. |
Class<Void> |
getConsumedType()
Returns the class of the consumed type. |
Class<Void> |
getProducedType()
Returns the class of the produced type. |
Object |
getProperty(String property)
|
void |
invoke(InvocationContext<Void,Void> context)
|
| Methods inherited from class groovy.lang.Script |
|---|
evaluate, evaluate, getBinding, invokeMethod, print, println, println, run, run, setBinding, setProperty |
| Methods inherited from class groovy.lang.GroovyObjectSupport |
|---|
getMetaClass, setMetaClass |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GroovyScriptCommand()
| Method Detail |
|---|
public final Class<Void> getProducedType()
CommandInvoker
getProducedType in interface CommandInvoker<Void,Void>public final Class<Void> getConsumedType()
CommandInvoker
getConsumedType in interface CommandInvoker<Void,Void>public final Object getProperty(String property)
getProperty in interface groovy.lang.GroovyObjectgetProperty in class groovy.lang.Script
public final Map<String,String> complete(CommandContext context,
String line)
ShellCommand
complete in interface ShellCommandcontext - the command contextline - the original command line arguments
public String describe(String line,
DescriptionMode mode)
ShellCommand
describe in interface ShellCommandline - the usage linemode - the description mode
public final void invoke(InvocationContext<Void,Void> context)
throws ScriptException
invoke in interface CommandInvoker<Void,Void>context - the command execution context
ScriptException - any script exceptionpublic final CommandInvoker<?,?> createInvoker(String line)
ShellCommand
createInvoker in interface ShellCommandline - the command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||