Class ReachableConstructions

java.lang.Object
org.ek9lang.compiler.phase5.ReachableConstructions

final class ReachableConstructions extends Object
THE "what does running this callable construct, and what does that construction run with no edge of its own" for the dependency-injection checks that walk CallGraph.getReachableIncludingReferences(Set, Function): DI completeness (ReachableInjectionsOrError, E08210/E08220) and DI ordering (TransitiveInjectionOrderingOrError, E08200). Use it - do not re-derive a third variant.

A constructor constructs its own type; a generic's member that constructs a type parameter (T()) constructs whatever each of the program's parameterisations of that generic substitutes - every aggregate type argument of each, an over-approximation that cannot miss the one substituted for T (that construction has no edge, D15). Constructing a type runs its property initialisers (_i_init) and one of its constructors (a type substituted for a T() has no edge to the one that runs, so all are taken).

Deliberately NOT here: the members a constructed type makes callable with no call site (its operators, a for loop's iterator()). They run LATER, so DI completeness adds them and DI ordering must not - a component method that injects a type registered below it is legal.