|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.shell.impl.command.spi.ShellCommand<Instance<T>>
org.crsh.lang.groovy.command.GroovyScriptShellCommand<T>
public class GroovyScriptShellCommand<T extends GroovyScriptCommand>
| Field Summary | |
|---|---|
private Class<T> |
clazz
. |
private CommandDescriptor<Instance<T>> |
descriptor
. |
private boolean |
hasExplicitReturn
. |
| Constructor Summary | |
|---|---|
GroovyScriptShellCommand(Class<T> clazz)
|
|
| Method Summary | |
|---|---|
private T |
createCommand()
|
protected Completer |
getCompleter(RuntimeContext context)
Returns a completer for this command. |
CommandDescriptor<Instance<T>> |
getDescriptor()
Returns the command descriptor. |
private CommandInvoker<Void,Object> |
getInvoker(String[] args)
|
protected Command<?,?> |
resolveCommand(InvocationMatch<Instance<T>> match)
Resolve the real command for a specified invocation match. |
| Methods inherited from class org.crsh.shell.impl.command.spi.ShellCommand |
|---|
complete, describe, describe, resolveCommand, resolveInvoker, resolveInvoker |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final Class<T extends GroovyScriptCommand> clazz
private final boolean hasExplicitReturn
private final CommandDescriptor<Instance<T extends GroovyScriptCommand>> descriptor
| Constructor Detail |
|---|
public GroovyScriptShellCommand(Class<T> clazz)
| Method Detail |
|---|
public CommandDescriptor<Instance<T>> getDescriptor()
ShellCommand
getDescriptor in class ShellCommand<Instance<T extends GroovyScriptCommand>>protected Command<?,?> resolveCommand(InvocationMatch<Instance<T>> match)
ShellCommand
resolveCommand in class ShellCommand<Instance<T extends GroovyScriptCommand>>match - the match
private T createCommand()
throws CommandCreationException
CommandCreationException
protected Completer getCompleter(RuntimeContext context)
throws CommandCreationException
ShellCommand
getCompleter in class ShellCommand<Instance<T extends GroovyScriptCommand>>context - the related runtime context
CommandCreationException - anything that would prevent completion to happen
private CommandInvoker<Void,Object> getInvoker(String[] args)
throws CommandCreationException
CommandCreationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||