Class InjectionCycleOrError

java.lang.Object
org.ek9lang.compiler.phase5.InjectionCycleOrError
All Implemented Interfaces:
Consumer<org.antlr.v4.runtime.tree.ParseTree>

final class InjectionCycleOrError extends Object implements Consumer<org.antlr.v4.runtime.tree.ParseTree>
Detects circular dependencies in component injection chains per application (E08190).

The graph: each registered component type, with an edge to the component registered as the type of each of its injection fields. Its cycles are THE shared StronglyConnectedComponents (a self-injection is a cycle too), so each tangle of components is reported ONCE, at its member registered first, with one cycle through it as the path. The members are recorded on the application (InjectionCycles) so the ordering checks that follow do not report E08200 for them: in a cycle no registration order works (Steve, 2026-10-11).

  • Constructor Details

  • Method Details

    • accept

      public void accept(org.antlr.v4.runtime.tree.ParseTree ctx)
      Specified by:
      accept in interface Consumer<org.antlr.v4.runtime.tree.ParseTree>