public class State extends ComponentEntity implements ConfigurableEntity, DropTargetHandler, Flowable
Transition
,
FSMActor
,
FSMDirector
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
ComponentPort |
incomingPort
The port linking incoming transitions.
|
Parameter |
isFinalState
An indicator of whether this state is a final state.
|
Parameter |
isInitialState
An indicator of whether this state is the initial state.
|
ComponentPort |
outgoingPort
The port linking outgoing transitions.
|
StringAttribute |
refinementName
Attribute specifying one or more names of refinements.
|
Parameter |
saveRefinementsInConfigurer
A boolean attribute to decide refinements of this state should be
exported as configurations of this state or not.
|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
State(CompositeEntity container,
java.lang.String name)
Construct a state with the given name contained by the specified
composite entity.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_exportMoMLContents(java.io.Writer output,
int depth)
Write a MoML description of the contents of this object, which
in this class are the attributes plus the ports.
|
void |
attributeChanged(Attribute attribute)
React to a change in an attribute.
|
java.lang.Object |
clone(Workspace workspace)
Clone the state into the specified workspace.
|
void |
configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
Configure the object with data from the specified input source
(a URL) and/or textual data.
|
void |
dropObject(NamedObj target,
java.util.List dropObjects,
java.lang.String moml)
React to a list of objects being dropped onto a target.
|
java.util.List |
errorTransitionList()
Return the list of outgoing error transitions from
this state.
|
Configurer |
getConfigurer()
Get the
Configurer object for this entity. |
java.lang.String |
getConfigureSource()
Return the input source that was specified the last time the configure
method was called.
|
java.lang.String |
getConfigureText()
Return the text string that represents the current configuration of
this object.
|
ComponentPort |
getIncomingPort()
Return the incoming port.
|
NamedObj |
getObjectInRefinement(java.lang.String name)
Get a NamedObj with the given name in the refinement of this state, if
any.
|
ComponentPort |
getOutgoingPort()
Return the outgoing port.
|
TypedActor[] |
getRefinement()
Return the refinements of this state.
|
java.util.List |
nonErrorNonTerminationTransitionList()
Return the list of outgoing transitions from
this state that are neither error nor termination transitions.
|
java.util.List |
nonpreemptiveTransitionList()
Return the list of non-preemptive outgoing transitions from
this state.
|
java.util.List |
preemptiveTransitionList()
Return the list of preemptive outgoing transitions from
this state.
|
java.util.List |
terminationTransitionList()
Return the list of termination transitions from
this state.
|
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setContainer, setName
_addPort, _description, _removePort, _validateSettables, connectedPortList, connectedPorts, connectionsChanged, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDerivedLevel, getDerivedList, propagateValue
description, getDisplayName, getFullName, getName, getName
public ComponentPort incomingPort
public Parameter isFinalState
public Parameter isInitialState
public ComponentPort outgoingPort
public StringAttribute refinementName
public Parameter saveRefinementsInConfigurer
public State(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the state.IllegalActionException
- If the state cannot be contained
by the proposed container.NameDuplicationException
- If the name coincides with
that of an entity already in the container.public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.IllegalActionException
- If thrown by the superclass
attributeChanged() method.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class ComponentEntity
workspace
- The workspace for the new state.java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void configure(java.net.URL base, java.lang.String source, java.lang.String text) throws java.lang.Exception
This method is defined to throw a very general exception to allow classes that implement the interface to use whatever exceptions are appropriate.
configure
in interface Configurable
base
- The base relative to which references within the input
are found, or null if this is not known, or there is none.source
- The input source, which specifies a URL, or null
if none.text
- Configuration information given as text, or null if
none.java.lang.Exception
- If something goes wrong.public void dropObject(NamedObj target, java.util.List dropObjects, java.lang.String moml) throws IllegalActionException
dropObject
in interface DropTargetHandler
target
- The target on which the objects are dropped.dropObjects
- The list of objects dropped onto the target.moml
- The moml string generated for the dropped objects.IllegalActionException
- If the handling is unsuccessful.public java.util.List errorTransitionList() throws IllegalActionException
IllegalActionException
- If the parameters giving transition
properties cannot be evaluated.public java.lang.String getConfigureSource()
getConfigureSource
in interface Configurable
public java.lang.String getConfigureText()
getConfigureText
in interface Configurable
public Configurer getConfigurer()
Configurer
object for this entity.getConfigurer
in interface ConfigurableEntity
public ComponentPort getIncomingPort()
getIncomingPort
in interface Flowable
public NamedObj getObjectInRefinement(java.lang.String name) throws IllegalActionException
name
- The name of the NamedObj.IllegalActionException
- If the refinement cannot be found, or
if a comma-separated list is malformed.public ComponentPort getOutgoingPort()
getOutgoingPort
in interface Flowable
public TypedActor[] getRefinement() throws IllegalActionException
IllegalActionException
- If the specified refinement
cannot be found, or if a comma-separated list is malformed.public java.util.List nonErrorNonTerminationTransitionList() throws IllegalActionException
IllegalActionException
- If the parameters giving transition
properties cannot be evaluated.public java.util.List nonpreemptiveTransitionList() throws IllegalActionException
IllegalActionException
- If the parameters giving transition
properties cannot be evaluated.public java.util.List preemptiveTransitionList() throws IllegalActionException
IllegalActionException
- If the parameters giving transition
properties cannot be evaluated.public java.util.List terminationTransitionList() throws IllegalActionException
IllegalActionException
- If the parameters giving transition
properties cannot be evaluated.protected void _exportMoMLContents(java.io.Writer output, int depth) throws java.io.IOException
_exportMoMLContents
in class Entity
output
- The output to write to.depth
- The depth in the hierarchy, to determine indenting.java.io.IOException
- If an I/O error occurs.NamedObj.exportMoML(Writer, int)