Package ptolemy.actor.util
Class DependencyDeclaration
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.actor.util.DependencyDeclaration
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class DependencyDeclaration extends Attribute
An instance of DependencyDeclaration is an attribute that declares variable dependence information of a parameter. This attribute is usually created in a parameter, when necessary, during the preinitialize method of an actor. This class is used primarily by the ConstVariableModelAnalysis class to determine a change context for parameters whose value dependence is not declared through an expression reference, but maintained by the actor's Java code instead.This attribute is not persistent by default, so it will not be exported into a MoML representation of the model.
- Since:
- Ptolemy II 4.0
- Version:
- $Id$
- Author:
- Steve Neuendorffer
- See Also:
ConstVariableModelAnalysis
- Pt.AcceptedRating:
- Yellow (neuendor)
- Pt.ProposedRating:
- Yellow (neuendor)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
-
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 DependencyDeclaration(Variable container, java.lang.String name)
Construct an DependencyDeclaration attribute in the given container with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List
getDependents()
Return the list of dependents of the parameter that contains this attribute.void
setDependents(java.util.List dependents)
Set the set of dependents for this declaration.-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _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, 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
-
-
-
-
Constructor Detail
-
DependencyDeclaration
public DependencyDeclaration(Variable container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct an DependencyDeclaration attribute in the given container with the given name. The container argument must not be null, or a NullPointerException will be thrown. If the name argument is null, then the name is set to the empty string. Increment the version number of the workspace. Set this attribute to be not persistent.- Parameters:
container
- The container.name
- The name of this attribute.- Throws:
IllegalActionException
- If the name has a period in it, or the attribute is not compatible with the specified container.NameDuplicationException
- If the container already contains an entity with the specified name.
-
-
Method Detail
-
getDependents
public java.util.List getDependents()
Return the list of dependents of the parameter that contains this attribute. This attribute declares that the container depends on at least the given set of parameters.- Returns:
- A list of variables.
- See Also:
setDependents(java.util.List)
-
setDependents
public void setDependents(java.util.List dependents)
Set the set of dependents for this declaration.- Parameters:
dependents
- A list of variables.- Throws:
java.lang.RuntimeException
- If the list of dependents is null.- See Also:
getDependents()
-
-