# Call hierarchy extended for OT/J

The purpose of the Java call hierarchy view is to statically display all potential control flows originating from or leading to a specific program element. Since callout and callin method bindings in OT/J introduce new kinds of control flows, it is only appropriate to also visualize the control flows induced by such method bindings.

Whenever a given method can be invoked via a callout method binding, the call hierarchy shows a callout node. Here all calls to the corresponding role method will be forwarded to the base method.

Whenever a callin method binding may intercept a given control flow, a callin node is shown. Note, that a callin control flow is only taken at runtime, if the enclosing team is active and no guard predicate evaluates to false.

Additionally, whenever the call hierarchy shows the lifting constructor ( 2.3.1(b & c)) of a role (either as an intermediate node or when requesting the call hierarchy for the role class) all those locations are considered as callers that involve lifting a base object to the given role, because the lifting operation can implicitly trigger creation of a role instance. According to 2.3(b) lifting can occur

- in a callout method binding (for the return value)
- in a callin method binding (call target and arguments)
- in a team method with declared lifting