|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
org.crsh.command.GroovyCommand
org.crsh.command.CRaSHCommand
public abstract class CRaSHCommand
A real CRaSH command, the most powerful kind of command.
Field Summary | |
---|---|
private CommandContext |
context
. |
private ClassDescriptor<?> |
descriptor
. |
private boolean |
help
. |
private org.slf4j.Logger |
log
. |
private String |
unmatched
The unmatched text, only valid during an invocation. |
private boolean |
unquoteArguments
. |
Constructor Summary | |
---|---|
protected |
CRaSHCommand()
|
Method Summary | |
---|---|
CommandCompletion |
complete(CommandContext context,
String line)
Provide completions for the specified arguments. |
CommandInvoker<?,?> |
createInvoker(String line)
Provides an invoker for the specified arguments. |
String |
describe(String line,
DescriptionFormat mode)
Returns a description of the command or null if none can be found. |
protected CommandContext |
getContext()
|
ClassDescriptor<?> |
getDescriptor()
Returns the command descriptor. |
String |
getUnmatched()
|
boolean |
getUnquoteArguments()
Returns true if the command wants its arguments to be unquoted. |
protected String |
readLine(String msg)
|
protected String |
readLine(String msg,
boolean echo)
|
void |
setUnquoteArguments(boolean unquoteArguments)
|
(package private) static ScriptException |
toScript(Throwable cause)
|
Methods inherited from class org.crsh.command.GroovyCommand |
---|
getProperty, invokeMethod, setProperty |
Methods inherited from class groovy.lang.GroovyObjectSupport |
---|
getMetaClass, setMetaClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final org.slf4j.Logger log
private CommandContext context
private boolean unquoteArguments
private final ClassDescriptor<?> descriptor
private String unmatched
private boolean help
Constructor Detail |
---|
protected CRaSHCommand() throws IntrospectionException
IntrospectionException
Method Detail |
---|
public ClassDescriptor<?> getDescriptor()
public final boolean getUnquoteArguments()
public final void setUnquoteArguments(boolean unquoteArguments)
protected final String readLine(String msg)
protected final String readLine(String msg, boolean echo)
public final String getUnmatched()
protected final CommandContext getContext()
getContext
in class GroovyCommand
public final CommandCompletion complete(CommandContext context, String line)
ShellCommand
complete
in interface ShellCommand
context
- the command contextline
- the original command line arguments
public final String describe(String line, DescriptionFormat mode)
ShellCommand
describe
in interface ShellCommand
line
- the usage linemode
- the description mode
static ScriptException toScript(Throwable cause)
public final CommandInvoker<?,?> createInvoker(String line)
ShellCommand
createInvoker
in interface ShellCommand
line
- the command line arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |