Interface ScopeExtender

  • All Known Implementing Classes:
    ParameterSet, PtolemyPreferences, ScopeExtendingAttribute, UnitSystem

    public interface ScopeExtender
    An interface for attributes that extend their container's scope. Any parameter contained by an attribute implementing this interface has the same visibility as parameters of the container of the attribute.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$, $Id$
    Author:
    Xiaojun Liu
    See Also:
    Variable
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List attributeList()
      Return a list of the attributes contained by this object.
      void expand()
      Expand the scope of the container by creating any required parameters.
      Attribute getAttribute​(java.lang.String name)
      Get the attribute with the given name.
      void validate()
      Evaluate the expressions of all the parameters of the scope extender.
    • Method Detail

      • attributeList

        java.util.List attributeList()
        Return a list of the attributes contained by this object. If there are no attributes, return an empty list. This method is read-synchronized on the workspace.
        Returns:
        An unmodifiable list of instances of Attribute.
      • expand

        void expand()
             throws IllegalActionException
        Expand the scope of the container by creating any required parameters. This should set the expressions of the parameters, but not evaluate them (not call validate().
        Throws:
        IllegalActionException - If any required attribute cannot be created.
      • getAttribute

        Attribute getAttribute​(java.lang.String name)
        Get the attribute with the given name. The name may be compound, with fields separated by periods, in which case the attribute returned is contained by a (deeply) contained attribute.
        Parameters:
        name - The name of the desired attribute.
        Returns:
        The requested attribute if it is found, null otherwise.