|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.cli4j.ParseTree
The ParseTree class models the command tree parsed from the command.xml
file. It is used constantly by the CliDriver class.
| Field Summary | |
static java.lang.String |
DEFAULT_EXIT_COMMAND
The default command executed by the user to break out of a "sticky" command; this value is overriden by the exitCommand attribute of the command-tree
element. |
| Constructor Summary | |
ParseTree()
Create a new, empty parse tree. |
|
| Method Summary | |
void |
addNode(Node topLevelNode)
Add a top level command node to the root of the command tree. |
java.lang.String |
getExitCommand()
Get the command the user executes to "break out" of a sticky command; if there is no sticky command, exit the application. |
java.lang.String |
getHelp()
|
java.lang.String |
getInitCommandClass()
Get the fully qualified class name that implements the Command interface to execute after the command tree is
parsed and then initialized. |
java.lang.String |
getName()
Get the name of the application. |
Node[] |
getNodes()
Get all of the top level command nodes. |
java.lang.String |
getPrompt()
Get the default console prompt. |
Node |
getRoot()
The root node. |
java.lang.String |
getShutdownCommandClass()
|
void |
setExitCommand(java.lang.String exitCommand)
Set the command the user executes to "break out" of a sticky command. |
void |
setHelp(java.lang.String help)
|
void |
setInitCommandClass(java.lang.String initClassName)
Sets the fully qualified class name that implements the Command interface to execute after the command tree is
parsed then initialized. |
void |
setName(java.lang.String name)
Set the application name. |
void |
setPrompt(java.lang.String prompt)
Set the default prompt. |
void |
setShutdownCommandClass(java.lang.String shutdownClassName)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_EXIT_COMMAND
exitCommand attribute of the command-tree
element.| Constructor Detail |
public ParseTree()
| Method Detail |
public Node getRoot()
public java.lang.String getPrompt()
public void setPrompt(java.lang.String prompt)
public method solely for
the Digester.public java.lang.String getName()
public void setName(java.lang.String name)
public method solely
for the Digester.public void addNode(Node topLevelNode)
topLevelNode - a top level command.public Node[] getNodes()
public java.lang.String getInitCommandClass()
Command interface to execute after the command tree is
parsed and then initialized.public void setInitCommandClass(java.lang.String initClassName)
Command interface to execute after the command tree is
parsed then initialized. This is a public method solely
for the Digester.public java.lang.String getExitCommand()
public void setExitCommand(java.lang.String exitCommand)
public method solely for the
Digester.public java.lang.String getHelp()
public void setHelp(java.lang.String help)
public void setShutdownCommandClass(java.lang.String shutdownClassName)
public java.lang.String getShutdownCommandClass()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||