|
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.SmcGuard
public final class SmcGuard
This is the second half of a
transition
definition.
This contains the:
SmcTransition
,
SmcAction
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 | |
---|---|
SmcGuard(java.lang.String cond,
int lineNumber,
SmcTransition transition)
Creates a guard instance for the given transition, line number and condition. |
Method Summary | |
---|---|
void |
accept(SmcVisitor visitor)
Calls the visitor's visit method for this finite state machine element. |
java.util.List<SmcAction> |
getActions()
Returns the transition action list. |
java.lang.String |
getCondition()
Returns the guard condition. |
java.lang.String |
getEndState()
Returns the transition end state name. |
java.lang.String |
getPopArgs()
Returns the pop transition arguments. |
java.lang.String |
getPushState()
Returns the push state name. |
SmcTransition |
getTransition()
Returns the transition to which this guard belongs. |
SmcElement.TransType |
getTransType()
Returns the transition type. |
boolean |
hasCtxtReference()
Returns true if this guard references the
ctxt variable and false otherwise. |
void |
setActions(java.util.List<SmcAction> actions)
Sets the transition actions. |
void |
setEndState(java.lang.String endState)
Sets the transition end state name. |
void |
setPopArgs(java.lang.String args)
Set the pop transition arguments. |
void |
setPushState(java.lang.String state)
Sets the push state name. |
void |
setTransType(SmcElement.TransType transType)
Sets the transition type. |
java.lang.String |
toString()
Returns the transition guard text representation. |
Methods inherited from class net.sf.smc.model.SmcElement |
---|
getLineNumber, getName, merge |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SmcGuard(java.lang.String cond, int lineNumber, SmcTransition transition)
cond
- transition guard condition.lineNumber
- where this guard appears in the .sm
file.transition
- guard belongs to this transition.Method Detail |
---|
public void accept(SmcVisitor visitor)
accept
in class SmcElement
visitor
- The visitor instance.SmcVisitor
public SmcTransition getTransition()
public java.lang.String getCondition()
public SmcElement.TransType getTransType()
public java.lang.String getEndState()
public java.lang.String getPushState()
push
transition. This state become the current state after the
transition completes. It is not the state pushed on
to the state stack.
public java.lang.String getPopArgs()
pop
transition.
public boolean hasCtxtReference()
true
if this guard references the
ctxt
variable and false
otherwise. The
ctxt
variable plays a similar rote as this
or self
in object-oriented programming languages.
ctxt
is the first parameter for all transitions
and is a reference to the FSM context instance (even if
a transitions has no defined parameters it still has this
one).
true
if this guard references the
ctxt
variable and false
otherwise.public java.util.List<SmcAction> getActions()
public void setTransType(SmcElement.TransType transType)
transType
- the transition type.public void setEndState(java.lang.String endState)
endState
- the end state name.public void setPushState(java.lang.String state)
state
- a state name.public void setPopArgs(java.lang.String args)
args
- pop transition arguments.public void setActions(java.util.List<SmcAction> actions)
null
but
may be empty.
actions
- transition actions.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 |