Class TransitiveInjectionOrderingOrError

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

final class TransitiveInjectionOrderingOrError extends Object
Post-parallel detector for transitive injection ordering validation (E08200), run once the call graph is built.

For each statement of an application block - a registration or a block statement - InjectionOrderingOrError records what it starts running: its calls (a registration's constructor, the calls in its arguments, its aspects' constructors), and the dynamic functions and classes it creates. This follows each through CallGraph.getReachableIncludingReferences(Set, Function) - the same fail-closed over-approximation DI completeness uses (E08210/E08220), with construction taken from ReachableConstructions - and reports, at the statement, every injection reachable from it whose type is not registered above it: an injection in the body of a reached function, method or constructor, or an injection field of a type a reached callable constructs. An injection is a load from the application when it runs, so a type registered later loads nothing.

Only what runs DURING the statement is followed: the members a constructed type makes callable with no call site are not added (they run later, once the application is prepared), so a component method that injects a type registered below it stays legal.

A call through an abstract method reaches an override only where the call graph links them: to the subtypes actually constructed in the program (rapid type analysis, PolymorphicOverrideLinker) - the same model as the completeness check (D13, Steve 2026-10-19). An override on a subtype that is never constructed cannot run, so its injections are not judged here; an application that does construct it gets the error then. This check once followed every abstract call BY NAME into every concrete subtype (class-hierarchy analysis) and reported a false E08200 (and a false E08210, through UnsatisfiedInjectionReporter) for a subtype that was never made.

  • Constructor Details

    • TransitiveInjectionOrderingOrError

      TransitiveInjectionOrderingOrError(CallGraph callGraph, Parameterisations parameterisations)
  • Method Details

    • check

      void check(AggregateSymbol application, ErrorListener errorListener)
      Check transitive injection ordering for a single application symbol.