|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--yakscript.Action
Abstract base class extended by all YakScript actions
Field Summary | |
protected java.util.StringTokenizer |
arguments
Arguments passed to action |
protected boolean |
condition
Whether action will be executed |
Constructor Summary | |
Action()
|
Method Summary | |
abstract boolean |
exec(YakScript yakScript)
Executes this action Override this to actually provide the functionality of your action |
abstract java.lang.String |
getKeyword()
Return the keyword of this action |
boolean |
isCondition()
Test the condition in this action |
boolean |
isFinal()
Whether execution of the current action should stop after this command Returns false by default, override this and return true if the action permanently goes to a new state (eg. |
boolean |
isInitial()
Whether the initial action should be executed after this command Returns false by default, override this and return true if your keyword causes a switch to a new FrameState, eg. |
void |
setArguments(java.util.StringTokenizer _arguments)
Set the arguments for this action and verify their contents Override this if you need to perform syntax checking on the arguments passed to your action |
void |
setCondition(java.lang.String condString,
java.util.Hashtable variables)
Set the condition for this action and verify its syntax |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.StringTokenizer arguments
protected boolean condition
Constructor Detail |
public Action()
Method Detail |
public abstract java.lang.String getKeyword()
public abstract boolean exec(YakScript yakScript)
yakScript
- Currently executing instance of YakScriptpublic boolean isCondition()
condition
- Condition to be testedpublic boolean isInitial()
public boolean isFinal()
public void setArguments(java.util.StringTokenizer _arguments) throws SyntaxErrorException
args
- Arguments to passSyntaxErrorException
- Thrown if the arguments are
syntactically invalid for this actionpublic void setCondition(java.lang.String condString, java.util.Hashtable variables) throws SyntaxErrorException, UndefinedVariableException
condition
- Condition stringSyntaxErrorException
- Thrown if condition is formatted
incorrectly or contains an unknown operator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |