RoleConstraints

scroll.internal.support.impl.RoleConstraints

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def addRoleEquivalence[A <: AnyRef : ClassTag, B <: AnyRef : ClassTag](): Unit

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 parameters

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

Attributes

Definition Classes
override def addRoleImplication[A <: AnyRef : ClassTag, B <: AnyRef : ClassTag](): Unit

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 parameters

A

type of role A

B

type of role B that should be played implicitly if A is played

Attributes

Definition Classes
override def addRoleProhibition[A <: AnyRef : ClassTag, B <: AnyRef : ClassTag](): Unit

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 parameters

A

type of role A

B

type of role B that is not allowed to be played if A is played already

Attributes

Definition Classes
override def checked(func: => Unit): Unit

Wrapping function that checks all available role constraints for all core objects and its roles after the given function was executed. Throws a typed constraint validation error 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 typed constraint validation error if a role constraint is violated.

Value parameters

func

the function to execute and check role constraints afterwards

Attributes

Definition Classes