Class 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)
    • 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()