|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nz.ac.waikato.modeljunit.AbstractListener
public abstract class AbstractListener
An implementation of ModelListener that ignores all events.
Subclasses must define the getName
method, at least.
Field Summary | |
---|---|
protected Model |
model_
|
Constructor Summary | |
---|---|
AbstractListener()
|
Method Summary | |
---|---|
void |
doneGuard(java.lang.Object state,
int action,
boolean enabled,
int value)
The Model calls this after each guard evaluation. |
void |
doneReset(java.lang.String reason,
boolean testing)
The Model calls this after each reset(boolean) action. |
void |
doneTransition(int action,
Transition tr)
The Model calls this after taking each transition. |
void |
failure(TestFailureException ex)
The Model calls this when an action has found an error. |
Model |
getModel()
Returns the model that this listener is listening to. |
void |
setModel(Model model)
Tell the listener which model it is listening to. |
void |
startAction(java.lang.Object state,
int action,
java.lang.String name)
This is called just before an action is about to be executed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface nz.ac.waikato.modeljunit.ModelListener |
---|
getName |
Field Detail |
---|
protected Model model_
Constructor Detail |
---|
public AbstractListener()
Method Detail |
---|
public Model getModel()
getModel
in interface ModelListener
public void setModel(Model model)
ModelListener
setModel
in interface ModelListener
public void doneReset(java.lang.String reason, boolean testing)
ModelListener
doneReset
in interface ModelListener
reason
- An adjective that describe why the reset was done.testing
- The parameter that was passed to the FsmModel reset call.public void doneGuard(java.lang.Object state, int action, boolean enabled, int value)
ModelListener
enabled
boolean says whether the guard of action is
enabled or not, while value
gives the actual value returned
by the guard method (0 for false, 1 for true, or other positive
integer values for Markov chain guards).
doneGuard
in interface ModelListener
public void startAction(java.lang.Object state, int action, java.lang.String name)
ModelListener
startAction
in interface ModelListener
state
- The current state of the model.action
- The number of the action.name
- The name of the action.public void doneTransition(int action, Transition tr)
ModelListener
doneTransition
in interface ModelListener
action
- The number of the action just taken.tr
- The transition just taken.public void failure(TestFailureException ex)
ModelListener
failure
in interface ModelListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |