Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.0.4
-
None
Description
In some situations it is much easier if you can execute an action when you enter to or exit from a certain state regardless of which transition has caused it.
else you have to repeat the behavior in each entering or exiting transition.
Here some more information could be found:
http://en.wikipedia.org/wiki/UML_state_machine#Entry_and_exit_actions
here is a sample usage:
@onEntry(LOADED )
public void onEntryStart() {
System.out.println("On Start Entry");
}
@onExit(LOADED)
public void onEntryExit() {
System.out.println("On Start Exit");
}
I attach a candidate implementation.