|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.panels.FSMBuilder
This class provides a standard way to build a finite state machine
representation that is operated by a FSM
.
Constructor Summary | |
FSMBuilder()
Initializes the FSMBuilder . |
|
FSMBuilder(Step[] fsmSteps)
|
|
FSMBuilder(java.lang.String[] fsmStates)
|
|
FSMBuilder(java.lang.String[][] fsmSpec)
This constructor accepts a two-dimensional String array
whose contents constitute an FSM specification. |
Method Summary | |
void |
addStateTrans(java.lang.Object trans,
java.lang.Object targetStateID)
Adds the specified transition to the FSM state. |
FSM |
getFSM()
Returns an FSM for the specification that has been built
up using this FSMBuilder . |
FSM |
getFSM(java.lang.Object haltingTransition)
Same as the method with no arguments, except that the argument here specifies the halting transition associated with the FSM. |
void |
newState(java.lang.Object stateID,
boolean isFinalState)
Tells the builder to create a new state in the FSM. |
void |
setFSMState(Step fsmStep)
The FSMBuilder must have its current state set before
calling this method or else a NullPointerException is
thrown. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FSMBuilder()
FSMBuilder
. The newState()
method should be called immediately after creating a new
FSMBuilder
; generally, you would want to create the
START_STATE
first.
public FSMBuilder(java.lang.String[] fsmStates)
public FSMBuilder(Step[] fsmSteps)
public FSMBuilder(java.lang.String[][] fsmSpec)
String
array
whose contents constitute an FSM specification. The
String[][]
argument expresses the FSM as an array of
states; thus each state is just a String[]
. Within each
state, you have the following items, in this order:
Method Detail |
public FSM getFSM() throws FSMInvalidException
FSM
for the specification that has been built
up using this FSMBuilder
. If the FSM specification is
invalid, an FSMInvalidException
is thrown.
FSMInvalidException
public FSM getFSM(java.lang.Object haltingTransition) throws FSMInvalidException
FSMInvalidException
public void setFSMState(Step fsmStep)
FSMBuilder
must have its current state set before
calling this method or else a NullPointerException
is
thrown. This method will set the action that is to be taken when
the FSM enters the current state.
public void addStateTrans(java.lang.Object trans, java.lang.Object targetStateID)
trans
occurs in this FSM state, the FSM will move to
the state identified by targetStateID
.
public void newState(java.lang.Object stateID, boolean isFinalState)
Map
is created; and the state
is added to the FSM. The FSMBuilder
will then apply
subsequent changes (invoked through setStateAction()
and addStateTrans()
) to this newly created state.
If the specified stateID
already exists in the FSM,
then the FSMBuilder
sets its own internal state so that
subsequent FSM changes are made to the already existing FSM state.
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.