Interface ContainmentExtender

  • All Known Implementing Classes:
    Configurer.ContainmentExtender, ContainmentExtender

    public interface ContainmentExtender
    An interface to specify the containment relationship as seen by the model designer. This interface can be implemented by an attribute (such as ContainmentExtender. Such an attribute defines a special containment relationship that is slightly different from the containment relationship defined by NamedObj.getContainer(). The getExtendedContainer() method returns the container of the object that contains the implementing attribute. The returned container is supposed to be the object that visually contains the object that owns the implementing attribute, as seen by the model designer. In particular, for a modal model (either FSM or Ptera), even though a refinement is visually contained by a state or an event, NamedObj.getContainer() of that refinement does not return the state or event because of a difference between the visual representation and internal data representation. In that case, getExtendedContainer() of this interface returns the state or event.

    When the expression evaluator tries to resolve a variable name starting from an object, it checks whether an attribute implementing this interface is owned by the object if the variable cannot be found in that object. If one such attribute is found, the evaluator considers the container returned by getExtendedContainer(), instead of the NamedObj.getContainer() that it normally uses.

    Ptolemy II 8.0
    Thomas Huining Feng
    Red (tfeng)
    Red (tfeng)
    • Method Detail

      • getContainedObject

        NamedObj getContainedObject​(java.lang.String name)
                             throws IllegalActionException
        Get an object with the given name within the container.
        name - The name of the object.
        The object, or null if not found.
        IllegalActionException - If exception occurs when trying to get the contained object.