<< §1.2.1.(e) Role features | ↑ Table of Contents ↑ | §1.2.1.(g) No static initializers >> |
§1.2.1.(f) Static role methods
In contrast to inner classes in pure Java, a role class may indeed define static methods. A static role method requires no role instance but it still requires a team instance in scope. Static role methods can be called:
- from the enclosing team,
- via callin (see §4.7).
Within a static role method the syntax MyTeam.this
is available for accessing the enclosing team instance.
<< §1.2.1.(e) Role features | ↑ Table of Contents ↑ | §1.2.1.(g) No static initializers >> |