<< §2.5.(a) Using abstract classes for creation | ↑ Table of Contents ↑ |
§2.5.(b) Relevant roles
A team must be marked abstract
if one of its relevant roles is abstract.
A role is relevant in this sense if
- the role class is public or if
- an explicit
new
expression would require to create instances of the role class, or if - any of the lifting methods of the enclosing team
would require to create instances of the role class.
A role is irrelevant with respect to lifting if either of the following holds:- It is not bound to a base class, neither directly nor
by an inherited
playedBy
clause. - It has a sub-role without a
playedBy
clause. - It is bound to an abstract base class, and for all concrete sub-classes of the base class, a binding to a more specific role class exists.
- It is not bound to a base class, neither directly nor
by an inherited
If neither property, relevance nor irrelevance, can be shown for an abstract role, a warning is given in case the enclosing team is not abstract.
<< §2.5.(a) Using abstract classes for creation | ↑ Table of Contents ↑ |