org.crsh.lang.impl.groovy.command
Class GroovyScriptShellCommand<T extends GroovyScriptCommand>
java.lang.Object
org.crsh.shell.impl.command.spi.Command<Instance<T>>
org.crsh.lang.impl.groovy.command.GroovyScriptShellCommand<T>
-
public class GroovyScriptShellCommand<T extends GroovyScriptCommand>
- extends Command<Instance<T>>
-
- Author:
- Julien Viet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
clazz
private final Class<T extends GroovyScriptCommand> clazz
-
.
hasExplicitReturn
private final boolean hasExplicitReturn
-
.
descriptor
private final CommandDescriptor<Instance<T extends GroovyScriptCommand>> descriptor
-
.
GroovyScriptShellCommand
public GroovyScriptShellCommand(Class<T> clazz)
throws IntrospectionException
-
- Throws:
IntrospectionException
getDescriptor
public CommandDescriptor<Instance<T>> getDescriptor()
- Description copied from class:
Command
-
Returns the command descriptor.
-
- Specified by:
getDescriptor
in class Command<Instance<T extends GroovyScriptCommand>>
-
- Returns:
- the descriptor
resolve
protected CommandMatch<?,?> resolve(InvocationMatch<Instance<T>> match)
- Description copied from class:
Command
-
Resolve the real match for a specified invocation match.
-
- Specified by:
resolve
in class Command<Instance<T extends GroovyScriptCommand>>
-
- Parameters:
match
- the match
- Returns:
- the command
createCommand
private T createCommand()
throws CommandException
-
- Throws:
CommandException
getCompleter
protected Completer getCompleter(RuntimeContext context)
throws CommandException
- Description copied from class:
Command
-
Returns a completer for this command.
-
- Specified by:
getCompleter
in class Command<Instance<T extends GroovyScriptCommand>>
-
- Parameters:
context
- the related runtime context
- Returns:
- the completer
- Throws:
CommandException
- anything that would prevent completion to happen
getInvoker
private CommandInvoker<Void,Object> getInvoker(String[] args)
throws CommandException
-
- Throws:
CommandException
Copyright © 2015 eXo Platform SAS. All Rights Reserved.