|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.smc.model.SmcElement
net.sf.smc.model.SmcState
public final class SmcState
Contains the entry action, exit action and transition lists.
Also stores the owning map
and this state's name.
SmcMap
,
SmcTransition
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.smc.model.SmcElement |
---|
SmcElement.TransType |
Field Summary |
---|
Fields inherited from class net.sf.smc.model.SmcElement |
---|
_lineNumber, _name, NIL_STATE |
Constructor Summary | |
---|---|
SmcState(java.lang.String name,
int lineNumber,
SmcMap map)
Creates a state instance for the given state name, the line number where the state appears in the .sm file and the map to which this state belongs. |
Method Summary | |
---|---|
void |
accept(SmcVisitor visitor)
Calls the visitor's visit method for this finite state machine element. |
void |
addTransition(SmcTransition transition)
Adds a transition to the list. |
SmcTransition |
findTransition(java.lang.String name,
java.util.List<SmcParameter> parameters)
Returns the transition with the specified name and parameters. |
java.lang.String |
getClassName()
Returns the state class name. |
java.util.List<SmcAction> |
getEntryActions()
Returns the entry action list. |
java.util.List<SmcAction> |
getExitActions()
Returns the exit action list. |
java.lang.String |
getInstanceName()
Returns the state instance name. |
SmcMap |
getMap()
Returns the map to which this state belongs. |
java.lang.String |
getName()
Returns the state name. |
java.util.List<SmcTransition> |
getTransitions()
Returns the state transitions. |
void |
setEntryActions(java.util.List<SmcAction> actions)
Sets the state entry actions. |
void |
setExitActions(java.util.List<SmcAction> actions)
Sets the state exit actions. |
java.lang.String |
toString()
Returns this state text representation. |
Methods inherited from class net.sf.smc.model.SmcElement |
---|
getLineNumber, merge |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SmcState(java.lang.String name, int lineNumber, SmcMap map)
name
- the state name.lineNumber
- where the state appears in the .sm file.map
- the state is in this map.Method Detail |
---|
public void accept(SmcVisitor visitor)
accept
in class SmcElement
visitor
- The visitor instance.SmcVisitor
public SmcMap getMap()
public java.lang.String getName()
getName
in class SmcElement
public java.lang.String getClassName()
public java.lang.String getInstanceName()
public java.util.List<SmcAction> getEntryActions()
public java.util.List<SmcAction> getExitActions()
public java.util.List<SmcTransition> getTransitions()
public SmcTransition findTransition(java.lang.String name, java.util.List<SmcParameter> parameters)
null
.
name
- the transition name.parameters
- the transition parameters.
public void setEntryActions(java.util.List<SmcAction> actions)
actions
- the state entry actions.public void setExitActions(java.util.List<SmcAction> actions)
actions
- the state exit actions.public void addTransition(SmcTransition transition)
transition
- add this transition.public java.lang.String toString()
toString
in class java.lang.Object
|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |