Predicate Chaining::designedForChaining

Holds if callable c is designed for chaining. The following must be fulfilled:

  • c must be declared in a reference type.
  • All callables overriding c must be designed for chaining.
  • If c has a body, all (and at least one) returned values must be this.
  • If c has no body (abstract/interface callable or library callable), the return type of c must be a subtype of c’s declaring type, and c must be non-static.
predicate designedForChaining(Callable c)