public abstract class AbstractInitializableParameter extends Parameter implements HierarchyListener, Initializable
Red (eal) |
Yellow (eal ) |
Variable.CircularDependencyError, Variable.VariableScope
NamedObj.ContainedObjectsIterator
Settable.Visibility
_currentExpression, _needsEvaluation, _parserScope, _parseTreeValid, _valueListeners
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
EXPERT, FULL, NONE, NOT_EDITABLE
Constructor and Description |
---|
AbstractInitializableParameter(NamedObj container,
java.lang.String name)
Construct an instance of the attribute.
|
Modifier and Type | Method and Description |
---|---|
protected Initializable |
_getInitializableContainer()
Return the first Initializable encountered above this
in the hierarchy that will be initialized (i.e., it is either
an atomic actor or an opaque composite actor).
|
void |
addInitializable(Initializable initializable)
Add the specified object to the set of objects whose
preinitialize(), initialize(), and wrapup()
methods should be invoked upon invocation of the corresponding
methods of this object.
|
java.lang.Object |
clone(Workspace workspace)
Clone the attribute.
|
void |
hierarchyChanged()
Notify this object that the containment hierarchy above it has
changed.
|
void |
hierarchyWillChange()
Notify this object that the containment hierarchy above it will be
changed, which results in
|
void |
initialize()
Invoke initialize() on registered initializables.
|
void |
preinitialize()
Invoke preinitialize() on registered initializables.
|
void |
removeInitializable(Initializable initializable)
Remove the specified object from the list of objects whose
preinitialize(), initialize(), and wrapup()
methods should be invoked upon invocation of the corresponding
methods of this object.
|
void |
setContainer(NamedObj container)
Override the base class to register as an
Initializable
so that preinitialize() is invoked, and as a
HierarchyListener , so that we are notified of
changes in the hiearchy above. |
void |
wrapup()
Invoke wrapup() on registered initializables.
|
addChoice, exportMoML, getChoices, removeAllChoices, removeChoice
_description, _evaluate, _notifyValueListeners, _parseIfNecessary, _propagate, _propagateToValueListeners, _propagateValue, _setToken, _setTokenAndNotify, addValueListener, getDeclaredType, getExpression, getFreeIdentifiers, getParserScope, getScope, getScope, getToken, getType, getTypeTerm, getValueAsString, getVariable, getVisibility, invalidate, isKnown, isLazy, isStringMode, isTypeAcceptable, removeValueListener, reset, setExpression, setLazy, setName, setParseTreeEvaluator, setStringMode, setToken, setToken, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, setUnknown, setVisibility, stringRepresentation, toString, typeConstraintList, typeConstraints, validate, valueChanged
getDefaultExpression
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, 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, uniqueName, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDisplayName
public AbstractInitializableParameter(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name.IllegalActionException
- If the superclass throws it.NameDuplicationException
- If the superclass throws it.public void addInitializable(Initializable initializable)
addInitializable
in interface Initializable
initializable
- The object whose methods should be invoked.removeInitializable(Initializable)
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
public void hierarchyChanged() throws IllegalActionException
preinitialize()
to handle re-establishing the connections.hierarchyChanged
in interface HierarchyListener
IllegalActionException
- If the change is not
acceptable.public void hierarchyWillChange() throws IllegalActionException
hierarchyWillChange
in interface HierarchyListener
IllegalActionException
- If unlinking to a published port fails.public void initialize() throws IllegalActionException
initialize
in interface Initializable
IllegalActionException
- If thrown by a subclass.public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
IllegalActionException
- If thrown by a subclass.public void removeInitializable(Initializable initializable)
removeInitializable
in interface Initializable
initializable
- The object whose methods should no longer be invoked.addInitializable(Initializable)
public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
Initializable
so that preinitialize() is invoked, and as a
HierarchyListener
, so that we are notified of
changes in the hiearchy above.setContainer
in class Variable
container
- The proposed container.IllegalActionException
- If the action would result in a
recursive containment structure, or if
this entity and container are not in the same workspace.NameDuplicationException
- If the container already has
an entity with the name of this entity.Attribute.getContainer()
public void wrapup() throws IllegalActionException
wrapup
in interface Initializable
IllegalActionException
- If thrown by a subclass.protected Initializable _getInitializableContainer()