public class Transform extends GTEvent implements ConfigurableEntity, TransformationListener
Red (tfeng) |
Yellow (tfeng) |
Modifier and Type | Class and Description |
---|---|
static class |
Transform.EmbeddedConfigurer
The configurer to be embedded in the transform event.
|
Event.EventParameter, Event.RefiringData
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected TransformationRule |
_transformation
The encapsulated transformation rule.
|
TransformEventController.Factory |
controllerFactory
The controller factory for this event to specialize the popup menu.
|
Parameter |
defer
Whether the transformation should be deferred with a change request.
|
Parameter |
matched
Whether the last pattern matching was successful (read-only).
|
TransformationMode |
mode
The transformation mode.
|
refinementExtender
actions, isEndingEvent, isFinalEvent, isInitialEvent, parameters
incomingPort, isFinalState, isInitialState, outgoingPort, refinementName, saveRefinementsInConfigurer
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
Transform(CompositeEntity container,
java.lang.String name)
Construct an event 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.
|
protected boolean |
_isActiveRefinement(TypedActor refinement)
Return whether the given refinement is active.
|
void |
addObject(NamedObj object)
Invoked when the specified object is added to a container.
|
java.lang.Object |
clone(Workspace workspace)
Clone the event into the specified workspace.
|
void |
configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
Configure this event with a transformation rule (an instance of
TransformationRule ) stored in the moml. |
Event.RefiringData |
fire(Token arguments)
Process this event and transform (or pattern-match) the model in the
model parameter depending on the transformation model
mode . |
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.
|
TypedActor[] |
getRefinement()
Get the refinement of this event, which is an instance of
TransformationRule . |
getModelParameter, setContainer
_getParserScope, addInitializable, attributeChanged, getController, initialize, isEndingEvent, isFinalEvent, isInitialEvent, preinitialize, refire, removeInitializable, scheduleEvents, stop, wrapup
dropObject, errorTransitionList, getIncomingPort, getObjectInRefinement, getOutgoingPort, nonErrorNonTerminationTransitionList, nonpreemptiveTransitionList, preemptiveTransitionList, terminationTransitionList
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, 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 TransformEventController.Factory controllerFactory
public Parameter defer
public Parameter matched
public TransformationMode mode
protected TransformationRule _transformation
public Transform(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 addObject(NamedObj object)
addObject
in interface TransformationListener
object
- The added object.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class Event
workspace
- The workspace for the new event.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
TransformationRule
) stored in the moml.configure
in interface Configurable
configure
in class State
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 Event.RefiringData fire(Token arguments) throws IllegalActionException
mode
.fire
in class Event
arguments
- The arguments used to process this event, which must be
either an ArrayToken or a RecordToken.IllegalActionException
- If the model cannot be transformed, or
if thrown by the superclass.TransformationMode
public java.lang.String getConfigureSource()
getConfigureSource
in interface Configurable
getConfigureSource
in class State
public java.lang.String getConfigureText()
getConfigureText
in interface Configurable
getConfigureText
in class State
public Configurer getConfigurer()
Configurer
object for this entity.getConfigurer
in interface ConfigurableEntity
getConfigurer
in class State
public TypedActor[] getRefinement()
TransformationRule
.getRefinement
in class State
protected void _exportMoMLContents(java.io.Writer output, int depth) throws java.io.IOException
_exportMoMLContents
in class State
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)
protected boolean _isActiveRefinement(TypedActor refinement)
TransformationRule
instance._isActiveRefinement
in class Event
refinement
- The refinement.