<< §1.2.2.(f) Substitutions for type anchors | ↑ Table of Contents ↑ | §1.2.2.(h) Externalized creation >> |
§1.2.2.(g) Legal contexts
Anchored types for externalized roles may be used in the following contexts:
- Declaration of an attribute
- Declaration of a local variable
- Declaration of a parameter or result type of a method or constructor
- In the
playedBy
clause of a role class (see §2.1).
It is not legal to inherit from an anchored type, since this would require membership of the referenced team instance, which can only be achieved by class nesting.
Note:
Item 4. — within the given restriction — admits the case where the same class is a role of one team and the base class for the role of another team. Another form of nesting is defined in §1.5.<< §1.2.2.(f) Substitutions for type anchors | ↑ Table of Contents ↑ | §1.2.2.(h) Externalized creation >> |