|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jimmc.roots.CommandInterpreter
CommandInterpreter is a simple command interpreter for a RootsBase.
Field Summary | |
java.util.Hashtable |
commandDictionary
|
java.util.Hashtable |
printFormatDictionary
|
java.util.Hashtable |
recordFormatDictionary
|
boolean |
runMe
|
Constructor Summary | |
CommandInterpreter()
Create a CommandInterpreter with no attached RootsBase |
|
CommandInterpreter(RootsBase b)
Create a CommandInterpreter with an attached RootsBase |
Method Summary | |
void |
addCommand(Command c)
Add one command to our dictionary |
void |
addPrintFormat(PrintFormat f)
Add one print format to our dictionary |
void |
addRecordFormat(RecordFormat f)
Add one record format to our dictionary |
void |
doCommand(java.lang.String line)
Parse and execute a single command line |
void |
doCommand(java.lang.String[] words)
Execute a single command from an array of word strings |
Command |
findCommand(java.lang.String name)
Get a command by name. |
PrintFormat |
findPrintFormat(java.lang.String name)
Get a print format by name. |
RecordFormat |
findRecordFormat(java.lang.String name)
Get a record format by name. |
java.lang.String[] |
getPrintFormats()
Get a list of the print formats. |
java.lang.String[] |
getRecordFormats()
Get a list of the record formats. |
java.lang.String[] |
parseCommandLine(java.lang.String line)
Parse a single command line into an array of strings. |
void |
run()
Run the CommandInterpreter thread when caller invokes 'start' |
void |
setInputStream(java.io.InputStream rawIn)
|
void |
setRootsBase(RootsBase b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean runMe
public java.util.Hashtable commandDictionary
public java.util.Hashtable printFormatDictionary
public java.util.Hashtable recordFormatDictionary
Constructor Detail |
public CommandInterpreter()
public CommandInterpreter(RootsBase b)
Method Detail |
public void addCommand(Command c)
public Command findCommand(java.lang.String name)
public void addPrintFormat(PrintFormat f)
public PrintFormat findPrintFormat(java.lang.String name)
public java.lang.String[] getPrintFormats()
public void addRecordFormat(RecordFormat f)
public RecordFormat findRecordFormat(java.lang.String name)
public java.lang.String[] getRecordFormats()
public void setInputStream(java.io.InputStream rawIn)
public void setRootsBase(RootsBase b)
public void run()
run
in interface java.lang.Runnable
public void doCommand(java.lang.String line)
public java.lang.String[] parseCommandLine(java.lang.String line)
public void doCommand(java.lang.String[] words)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |