ru.yandex.qatools.fsm.annotations.OnTransit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yatomata Show documentation
Show all versions of yatomata Show documentation
Yet another finite state machine implementation
package ru.yandex.qatools.fsm.annotations;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.METHOD;
/**
* Marks method as FSM transition event handler. Such handler will be executed during transition. Method should have
* one of the following signatures:
*
*
* {@literal @}OnTransit
* public void onEvent(FromState fromState, ToState toState, Event event){}
*
* {@literal @}OnTransit
* public void onEvent(FromState fromState, Event event){}
*
* {@literal @}OnTransit
* public void onRun(Event event){}
*
*
* @author Ilya Sadykov
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({METHOD})
public @interface OnTransit {
}