public abstract class AbstractCommandType extends Object implements CommandType
CommandType.Setter, CommandType.Token
Modifier and Type | Field and Description |
---|---|
protected List<CommandType.Token> |
args |
protected Class<? extends Runnable> |
cmdClass |
protected List<CommandType.Setter> |
injectable |
protected Map<String,CommandType.Token> |
params |
Constructor and Description |
---|
AbstractCommandType(Class<? extends Runnable> cmdClass,
List<CommandType.Setter> injectable,
Map<String,CommandType.Token> params,
List<CommandType.Token> args) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CommandType o) |
protected Runnable |
createInstance(Shell shell) |
List<CommandType.Token> |
getArguments() |
Class<?> |
getCommandClass() |
protected CommandType.Token |
getLastToken(String... line)
The last element in line must be an empty element (e.g.
|
jline.Completor |
getLastTokenCompletor(Shell shell,
String... line) |
protected jline.Completor |
getParamCompletor(String prefix) |
Map<String,CommandType.Token> |
getParameters() |
String |
getSyntax() |
protected void |
inject(Shell shell,
Runnable cmd,
String... line) |
Runnable |
newInstance(Shell shell,
String... line) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAliases, getHelp, getName
protected List<CommandType.Setter> injectable
protected Map<String,CommandType.Token> params
protected List<CommandType.Token> args
public AbstractCommandType(Class<? extends Runnable> cmdClass, List<CommandType.Setter> injectable, Map<String,CommandType.Token> params, List<CommandType.Token> args)
public Class<?> getCommandClass()
getCommandClass
in interface CommandType
public List<CommandType.Token> getArguments()
getArguments
in interface CommandType
public Map<String,CommandType.Token> getParameters()
getParameters
in interface CommandType
public String getSyntax()
getSyntax
in interface CommandType
public Runnable newInstance(Shell shell, String... line) throws ShellException
newInstance
in interface CommandType
ShellException
protected Runnable createInstance(Shell shell) throws Exception
Exception
protected CommandType.Token getLastToken(String... line)
line
- protected jline.Completor getParamCompletor(String prefix)
public jline.Completor getLastTokenCompletor(Shell shell, String... line)
getLastTokenCompletor
in interface CommandType
protected void inject(Shell shell, Runnable cmd, String... line) throws ShellException
ShellException
public int compareTo(CommandType o)
compareTo
in interface Comparable<CommandType>
Copyright © 2017 Nuxeo. All rights reserved.