Package ptolemy.actor.gt
Class TransitionMatcher
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.Relation
-
- ptolemy.kernel.ComponentRelation
-
- ptolemy.domains.modal.kernel.Transition
-
- ptolemy.actor.gt.TransitionMatcher
-
- All Implemented Interfaces:
java.lang.Cloneable
,GTEntity
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
,ValueListener
public class TransitionMatcher extends Transition implements GTEntity, ValueListener
A matcher to match any transition in an FSM controller or scheduling relation in a Ptera controller.- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Thomas Huining Feng
- Pt.AcceptedRating:
- Red (tfeng)
- Pt.ProposedRating:
- Yellow (tfeng)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description GTIngredientsAttribute
criteria
The attribute containing all the criteria in a list (GTIngredientList
).GTIngredientsEditor.Factory
editorFactory
The editor factory for ingredients in this matcher.GTIngredientsAttribute
operations
The attribute containing all the operations in a list (GTIngredientList
).PatternObjectAttribute
patternObject
The attribute that specifies the name of the corresponding entity in the pattern.-
Fields inherited from class ptolemy.domains.modal.kernel.Transition
annotation, defaultTransition, error, exitAngle, fsmTransitionParameterName, gamma, guardExpression, history, immediate, nondeterministic, outputActions, preemptive, refinementName, setActions, showFSMTransitionParameter, termination
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description TransitionMatcher(FSMActor container, java.lang.String name)
Construct a transition matcher with the given name contained by the specified entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GTIngredientsAttribute
getCriteriaAttribute()
Return the attribute that stores all the criteria for this matcher.java.lang.String
getDefaultIconDescription()
Return null.GTIngredientsAttribute
getOperationsAttribute()
Return the attribute that stores all the operations for this matcher.PatternObjectAttribute
getPatternObjectAttribute()
Return the attribute that stores the name of the corresponding entity in the pattern of the sameTransformationRule
, if this entity is in the replacement, or null otherwise.java.util.Set<java.lang.String>
labelSet()
Return the set of names of ingredients contained in this entity that can be resolved.boolean
match(NamedObj object)
Return true if the given object matches any transition in an FSM controller or the modal model controller.void
updateAppearance(GTIngredientsAttribute attribute)
Update appearance of this entity.void
valueChanged(Settable settable)
React to the fact that the specified Settable has changed.-
Methods inherited from class ptolemy.domains.modal.kernel.Transition
_checkPort, attributeChanged, choiceActionList, clone, commitActionList, destinationState, getFullLabel, getGuardExpression, getLabel, getParseTreeEvaluator, getRefinement, isDefault, isEnabled, isEnabled, isErrorTransition, isHistory, isImmediate, isNondeterministic, isPreemptive, isTermination, setContainer, setFsmTransitionParameter, setGuardExpression, sourceState
-
Methods inherited from class ptolemy.kernel.ComponentRelation
_checkContainer, _checkRelation, _propagateExistence, deepLinkedPortList, deepLinkedPorts, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, unlinkAll
-
Methods inherited from class ptolemy.kernel.Relation
_description, _getContainedObject, link, linkedObjectsList, linkedPortList, linkedPortList, linkedPorts, linkedPorts, numLinks, relationGroupList, unlink
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Field Detail
-
criteria
public GTIngredientsAttribute criteria
The attribute containing all the criteria in a list (GTIngredientList
).
-
editorFactory
public GTIngredientsEditor.Factory editorFactory
The editor factory for ingredients in this matcher.
-
operations
public GTIngredientsAttribute operations
The attribute containing all the operations in a list (GTIngredientList
).
-
patternObject
public PatternObjectAttribute patternObject
The attribute that specifies the name of the corresponding entity in the pattern.
-
-
Constructor Detail
-
TransitionMatcher
public TransitionMatcher(FSMActor container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a transition matcher with the given name contained by the specified entity. The container argument must not be null, or a NullPointerException will be thrown. This transition will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string.- Parameters:
container
- The container.name
- The name of the transition.- Throws:
IllegalActionException
- If the container is incompatible with this transition.NameDuplicationException
- If the name coincides with any relation already in the container.
-
-
Method Detail
-
getCriteriaAttribute
public GTIngredientsAttribute getCriteriaAttribute()
Return the attribute that stores all the criteria for this matcher.- Specified by:
getCriteriaAttribute
in interfaceGTEntity
- Returns:
- The attribute that stores all the criteria.
-
getDefaultIconDescription
public java.lang.String getDefaultIconDescription()
Return null.- Specified by:
getDefaultIconDescription
in interfaceGTEntity
- Returns:
- null
-
getOperationsAttribute
public GTIngredientsAttribute getOperationsAttribute()
Return the attribute that stores all the operations for this matcher.- Specified by:
getOperationsAttribute
in interfaceGTEntity
- Returns:
- The attribute that stores all the operations.
-
getPatternObjectAttribute
public PatternObjectAttribute getPatternObjectAttribute()
Return the attribute that stores the name of the corresponding entity in the pattern of the sameTransformationRule
, if this entity is in the replacement, or null otherwise.- Specified by:
getPatternObjectAttribute
in interfaceGTEntity
- Returns:
- The attribute that stores the name of the corresponding entity.
- See Also:
labelSet()
-
labelSet
public java.util.Set<java.lang.String> labelSet()
Return the set of names of ingredients contained in this entity that can be resolved.
-
match
public boolean match(NamedObj object)
Return true if the given object matches any transition in an FSM controller or the modal model controller.
-
updateAppearance
public void updateAppearance(GTIngredientsAttribute attribute)
Update appearance of this entity.- Specified by:
updateAppearance
in interfaceGTEntity
- Parameters:
attribute
- The attribute containing ingredients of this entity.- See Also:
GTEntityUtils.updateAppearance(GTEntity, GTIngredientsAttribute)
-
valueChanged
public void valueChanged(Settable settable)
React to the fact that the specified Settable has changed.- Specified by:
valueChanged
in interfaceValueListener
- Parameters:
settable
- The object that has changed value.- See Also:
GTEntityUtils.valueChanged(GTEntity, Settable)
-
-