|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.uniba.wiai.lspi.util.console.Command
de.uniba.wiai.lspi.util.console.ExecuteMacro
public class ExecuteMacro
This is an implementation of Command that allows the execution of
commands stored in a .txt file. Every line of the file must be
a valid command for the console, from that this command is executed. The file
must not contain empty lines.
The file is provided with help of the file parameter. To make
sure the file is found the complete path has to be provided. On Windows
systems the \ must be replaced by /.
| Field Summary | |
|---|---|
static java.lang.String |
COMMAND_NAME
The name of this command. |
static java.lang.String |
FILE_PARAM
The name of the parameter for the file name. |
static java.lang.String |
TIMES_PARAM
The number of times that the Macro is executed. |
| Constructor Summary | |
|---|---|
ExecuteMacro(java.lang.Object[] toCommand,
java.io.PrintStream out)
Creates a new instance of ExecuteMacro |
|
| Method Summary | |
|---|---|
void |
exec()
To be overwritten by subclasses for command execution. |
java.lang.String |
getCommandName()
Return the name of the command. |
void |
printOutHelp()
To be overwritten. |
| Methods inherited from class de.uniba.wiai.lspi.util.console.Command |
|---|
addParameter, execute, setParameters, setPrintStream |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COMMAND_NAME
public static final java.lang.String FILE_PARAM
public static final java.lang.String TIMES_PARAM
| Constructor Detail |
|---|
public ExecuteMacro(java.lang.Object[] toCommand,
java.io.PrintStream out)
toCommand - out - | Method Detail |
|---|
public void printOutHelp()
Command
printOutHelp in class Commandpublic java.lang.String getCommandName()
Command
getCommandName in class Commandexit.
public void exec()
throws ConsoleException
Command
exec in class CommandConsoleException - Exception during execution.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||