Class TransitiveInjectionOrderingOrError
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.
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, Parameterisations parameterisations) -
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, Parameterisations parameterisations)
-
-
Method Details
-
check
Check transitive injection ordering for a single application symbol.
-