Class TransitiveInjectionOrderingOrError
java.lang.Object
org.ek9lang.compiler.phase5.TransitiveInjectionOrderingOrError
Post-parallel detector for transitive injection ordering validation.
Runs in Phase 3 after the call graph is built by CallGraphCollector.
For each block statement call in an application block, this detector follows the call graph transitively to find all constructor calls. If any transitively constructed aggregate has injection fields whose types are not yet registered (based on the snapshot of available types at the block statement's position), DI_ORDERING_ERROR is emitted.
When the transitive analysis encounters a call to an abstract method, it uses the ConcreteSubtypeFinder to resolve all concrete implementations and checks their override methods for injection-related constructor calls. This handles the abstract method boundary problem where abstract methods have no body and thus no outgoing call edges in the call graph.
-
Constructor Summary
ConstructorsConstructorDescriptionTransitiveInjectionOrderingOrError(CallGraph callGraph, ConcreteSubtypeFinder subtypeFinder) -
Method Summary
Modifier and TypeMethodDescription(package private) voidcheck(AggregateSymbol application, ErrorListener errorListener) Check transitive injection ordering for a single application symbol.
-
Constructor Details
-
TransitiveInjectionOrderingOrError
TransitiveInjectionOrderingOrError(CallGraph callGraph, ConcreteSubtypeFinder subtypeFinder)
-
-
Method Details
-
check
Check transitive injection ordering for a single application symbol.
-