public class Transition extends Executable implements NamespacePrefixesHolder
Constructor and Description |
---|
Transition()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getCond()
Get the guard condition (may be null).
|
String |
getEvent()
Get the event that will trigger this transition (pending
evaluation of the guard condition in favor).
|
Map |
getNamespaces()
Get the XML namespaces at this action node in the SCXML document.
|
String |
getNext()
Get the ID of the transition target (may be null, if, for example,
the target is specified inline).
|
Path |
getPath()
Deprecated.
Use getPaths() instead.
|
List |
getPaths()
Get the path(s) of this transiton.
|
TransitionTarget |
getRuntimeTarget()
Deprecated.
A transition may have multiple targets,
use getRuntimeTargets() instead.
|
List |
getRuntimeTargets()
Get the list of runtime transition target, which always contains
atleast one TransitionTarget instance.
|
TransitionTarget |
getTarget()
Deprecated.
A transition may have multiple targets,
use getTargets() instead.
|
List |
getTargets()
Get the list of transition targets (may be an empty list).
|
void |
setCond(String cond)
Set the guard condition.
|
void |
setEvent(String event)
Set the event that will trigger this transition (pending
evaluation of the guard condition in favor).
|
void |
setNamespaces(Map namespaces)
Set the XML namespaces at this action node in the SCXML document.
|
void |
setNext(String next)
Set the transition target by specifying its ID.
|
void |
setTarget(TransitionTarget target)
Deprecated.
Use setTargets(List) instead.
|
addAction, getActions, getParent, setParent
public final String getCond()
public final void setCond(String cond)
cond
- The cond to set.public final String getEvent()
public final void setEvent(String event)
event
- The event to set.public final Map getNamespaces()
getNamespaces
in interface NamespacePrefixesHolder
public final void setNamespaces(Map namespaces)
setNamespaces
in interface NamespacePrefixesHolder
namespaces
- The document namespaces.public final TransitionTarget getTarget()
Remarks: Is null
for "stay" transitions.
Returns parent (the source node) for "self" transitions.
public final List getTargets()
Remarks: Is empty
for "stay" transitions.
Contains parent (the source node) for "self" transitions.
public final TransitionTarget getRuntimeTarget()
Remarks: For both the "stay" and "self"
transitions it returns parent (the source node). This method should
never return null
.
public final List getRuntimeTargets()
Remarks: For both the "stay" and "self"
transitions it returns parent (the source node). This method should
never return an empty list or null
.
public final void setTarget(TransitionTarget target)
target
- The target to set.public final String getNext()
getTargets()
public final void setNext(String next)
next
- The the transition target ID (used by SCXML Digester only).public final Path getPath()
Path
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.