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, waitgetAliases, getHelp, getNameprotected 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 CommandTypepublic List<CommandType.Token> getArguments()
getArguments in interface CommandTypepublic Map<String,CommandType.Token> getParameters()
getParameters in interface CommandTypepublic String getSyntax()
getSyntax in interface CommandTypepublic Runnable newInstance(Shell shell, String... line) throws ShellException
newInstance in interface CommandTypeShellExceptionprotected Runnable createInstance(Shell shell) throws Exception
Exceptionprotected CommandType.Token getLastToken(String... line)
line - protected jline.Completor getParamCompletor(String prefix)
public jline.Completor getLastTokenCompletor(Shell shell, String... line)
getLastTokenCompletor in interface CommandTypeprotected void inject(Shell shell, Runnable cmd, String... line) throws ShellException
ShellExceptionpublic int compareTo(CommandType o)
compareTo in interface Comparable<CommandType>Copyright © 2019 Nuxeo. All rights reserved.