RoleConstraintsApi
Allows to add and check role constraints (Riehle constraints) to a compartment instance.
Value members
Abstract methods
Adds an role equivalent constraint between the given role types. Interpretation: if a core object plays an instance of role type A it also has to play an instance of role type B and visa versa.
Adds an role equivalent constraint between the given role types. Interpretation: if a core object plays an instance of role type A it also has to play an instance of role type B and visa versa.
- Type Params
- A
type of role A that should be played implicitly if B is played
- B
type of role B that should be played implicitly if A is played
Adds an role implication constraint between the given role types. Interpretation: if a core object plays an instance of role type A it also has to play an instance of role type B.
Adds an role implication constraint between the given role types. Interpretation: if a core object plays an instance of role type A it also has to play an instance of role type B.
- Type Params
- A
type of role A
- B
type of role B that should be played implicitly if A is played
Adds an role prohibition constraint between the given role types. Interpretation: if a core object plays an instance of role type A it is not allowed to play B as well.
Adds an role prohibition constraint between the given role types. Interpretation: if a core object plays an instance of role type A it is not allowed to play B as well.
- Type Params
- A
type of role A
- B
type of role B that is not allowed to be played if A is played already
Wrapping function that checks all available role constraints for all core objects and its roles after the given function was executed. Throws a RuntimeException if a role constraint is violated!
Wrapping function that checks all available role constraints for all core objects and its roles after the given function was executed. Throws a RuntimeException if a role constraint is violated!
- Value Params
- func
the function to execute and check role constraints afterwards