public class StateMachineFactory
extends java.lang.Object
StateMachine
s by reading State
,
Transition
and Transitions
(or equivalent) and SelfTransition
annotations from one or more arbitrary
objects.限定符 | 构造器和说明 |
---|---|
protected |
StateMachineFactory(java.lang.Class<? extends java.lang.annotation.Annotation> transitionAnnotation,
java.lang.Class<? extends java.lang.annotation.Annotation> transitionsAnnotation,
java.lang.Class<? extends java.lang.annotation.Annotation> entrySelfTransitionsAnnotation,
java.lang.Class<? extends java.lang.annotation.Annotation> exitSelfTransitionsAnnotation) |
限定符和类型 | 方法和说明 |
---|---|
StateMachine |
create(java.lang.Object handler)
Creates a new
StateMachine from the specified handler object and
using a start state with id start . |
StateMachine |
create(java.lang.Object handler,
java.lang.Object... handlers)
Creates a new
StateMachine from the specified handler objects and
using a start state with id start . |
StateMachine |
create(java.lang.String start,
java.lang.Object handler)
Creates a new
StateMachine from the specified handler object and
using the State with the specified id as start state. |
StateMachine |
create(java.lang.String start,
java.lang.Object handler,
java.lang.Object... handlers)
Creates a new
StateMachine from the specified handler objects and
using the State with the specified id as start state. |
static StateMachineFactory |
getInstance(java.lang.Class<? extends java.lang.annotation.Annotation> transitionAnnotation)
Returns a new
StateMachineFactory instance which creates
StateMachine s by reading the specified Transition
equivalent annotation. |
protected StateMachineFactory(java.lang.Class<? extends java.lang.annotation.Annotation> transitionAnnotation, java.lang.Class<? extends java.lang.annotation.Annotation> transitionsAnnotation, java.lang.Class<? extends java.lang.annotation.Annotation> entrySelfTransitionsAnnotation, java.lang.Class<? extends java.lang.annotation.Annotation> exitSelfTransitionsAnnotation)
public static StateMachineFactory getInstance(java.lang.Class<? extends java.lang.annotation.Annotation> transitionAnnotation)
StateMachineFactory
instance which creates
StateMachine
s by reading the specified Transition
equivalent annotation.transitionAnnotation
- the Transition
equivalent annotation.StateMachineFactory
.public StateMachine create(java.lang.Object handler)
StateMachine
from the specified handler object and
using a start state with id start
.handler
- the object containing the annotations describing the
state machine.StateMachine
object.public StateMachine create(java.lang.String start, java.lang.Object handler)
StateMachine
from the specified handler object and
using the State
with the specified id as start state.start
- the id of the start State
to use.handler
- the object containing the annotations describing the
state machine.StateMachine
object.public StateMachine create(java.lang.Object handler, java.lang.Object... handlers)
StateMachine
from the specified handler objects and
using a start state with id start
.handler
- the first object containing the annotations describing the
state machine.handlers
- zero or more additional objects containing the
annotations describing the state machine.StateMachine
object.public StateMachine create(java.lang.String start, java.lang.Object handler, java.lang.Object... handlers)
StateMachine
from the specified handler objects and
using the State
with the specified id as start state.start
- the id of the start State
to use.handler
- the first object containing the annotations describing the
state machine.handlers
- zero or more additional objects containing the
annotations describing the state machine.StateMachine
object.