UML.Semantic.BehavioralElements.StateMachines
Class Guard
java.lang.Object
|
+--UML.Semantic.Foundation.Core.ModelElement
|
+--UML.Semantic.BehavioralElements.StateMachines.Guard
- All Implemented Interfaces:
- Element, ElementAtt, LinkAtt
- public class Guard
- extends ModelElement
A guard condition is a boolean expression that may be
attached to a transition in order to determine whether that
transition is enabled or not.
The guard is evaluated when an event occurrence triggers the
transition. Only if the guard is true at the time the event is
presented to the state machine will the transition actually take
place. Guards should be pure expressions without side effects.
Guard expressions with side effects may lead to unpredictable
results.
In the metamodel Guard is a ModelElement
so it can be substituted in refined state machines.
|
Constructor Summary |
Guard()
|
|
Method Summary |
boolean |
check()
Checks if well-formedness rules are respected in this model
element. |
java.lang.String |
getExpression()
|
void |
setExpression(java.lang.String expression)
|
| Methods inherited from class UML.Semantic.Foundation.Core.ModelElement |
add, add, getBindingList, getConstraintList, getElementType, getErrors, getHref, getId, getIdentification, getIdref, getIndex, getInfo, getIsOwned, getLabel, getLocator, getName, getNamespace, getNamespaceId, getStereotype, getTemplate, getTemplateParameterList, getTitle, getUuid, getUuidref, getVisibility, getVisibilitySymbol, getWarnings, setElementType, setErrors, setHref, setId, setIdref, setIndex, setIsOwned, setLabel, setName, setNamespace, setTemplate, setTitle, setUuid, setUuidref, setVisibility, setWarnings |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Guard
public Guard()
setExpression
public void setExpression(java.lang.String expression)
getExpression
public java.lang.String getExpression()
check
public boolean check()
- Checks if well-formedness rules are respected in this model
element.
- Overrides:
check in class ModelElement
- Returns:
- True if check was successful, false otherwise.