public interface ContainmentExtender
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.
Red (tfeng) |
Red (tfeng) |
Modifier and Type | Method and Description |
---|---|
NamedObj |
getContainedObject(java.lang.String name)
Get an object with the given name within the container.
|
NamedObj |
getExtendedContainer()
Get the extended container.
|
NamedObj getContainedObject(java.lang.String name) throws IllegalActionException
name
- The name of the object.IllegalActionException
- If exception occurs when trying to get
the contained object.NamedObj getExtendedContainer() throws IllegalActionException
IllegalActionException
- If exception occurs when trying to get
the container.