ptolemy.actor.util
Class DependencyDeclaration
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.util.DependencyDeclaration
- All Implemented Interfaces:
- java.io.Serializable, 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: DependencyDeclaration.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Steve Neuendorffer
- See Also:
ConstVariableModelAnalysis
,
Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary |
DependencyDeclaration(Variable container,
java.lang.String name)
Construct an DependencyDeclaration attribute in the given
container with the given name. |
Method Summary |
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, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, 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, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, 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 |
_dependents
private java.util.List _dependents
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.
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()