*
* @param transitionAnnotation the {@link Transition} equivalent annotation.
* @return the {@link StateMachineFactory}.
*/
public static StateMachineFactory getInstance(Class<? extends Annotation> transitionAnnotation) {
TransitionAnnotation a = transitionAnnotation.getAnnotation(TransitionAnnotation.class);
if (a == null) {
throw new IllegalArgumentException("The annotation class " + transitionAnnotation
+ " has not been annotated with the " + TransitionAnnotation.class.getName() + " annotation");
}
return new StateMachineFactory(transitionAnnotation, a.value(), OnEntry.class, OnExit.class);
}