public class GroovyScriptShellCommand<C extends GroovyScriptCommand> extends Object implements ShellCommand
| Constructor and Description |
|---|
GroovyScriptShellCommand(Class<C> clazz) |
| Modifier and Type | Method and Description |
|---|---|
CompletionMatch |
complete(RuntimeContext context,
String line)
Provide completions for the specified arguments.
|
private C |
createCommand() |
String |
describe(String line,
DescriptionFormat mode)
Returns a description of the command or null if none can be found.
|
private CommandInvoker<Object,Object> |
getInvoker(String[] args) |
CommandInvoker<?,?> |
resolveInvoker(String line)
Provides an invoker for the command line specified as a command line to parse.
|
CommandInvoker<?,?> |
resolveInvoker(String name,
Map<String,?> options,
List<?> args)
Provides an invoker for the command line specified under the form of a command, options and arguments.
|
private final Class<C extends GroovyScriptCommand> clazz
public GroovyScriptShellCommand(Class<C> clazz)
private C createCommand() throws CommandCreationException
CommandCreationExceptionpublic final CompletionMatch complete(RuntimeContext context, String line)
ShellCommandcomplete in interface ShellCommandcontext - the command contextline - the original command line argumentspublic final String describe(String line, DescriptionFormat mode)
ShellCommanddescribe in interface ShellCommandline - the usage linemode - the description modepublic final CommandInvoker<?,?> resolveInvoker(String line) throws CommandCreationException
ShellCommandresolveInvoker in interface ShellCommandline - the command line argumentsCommandCreationExceptionpublic final CommandInvoker<?,?> resolveInvoker(String name, Map<String,?> options, List<?> args) throws CommandCreationException
ShellCommandresolveInvoker in interface ShellCommandname - the command name, might be nulloptions - the optionsargs - the argumentsCommandCreationExceptionprivate CommandInvoker<Object,Object> getInvoker(String[] args) throws CommandCreationException
CommandCreationExceptionCopyright © 2013 eXo Platform SAS. All Rights Reserved.