Class UnsatisfiedInjectionReporter

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

final class UnsatisfiedInjectionReporter extends Object
Reports dependency-injection fields that cannot be satisfied at a given point, walking an aggregate's own injection fields plus those of any aggregate types reachable through its property field types and supers. Shared by the direct and transitive injection-ordering checks so the recursion, the never-registered/out-of-order classification, and every diagnostic message are maintained in one place. An injection that a circular injection chain explains (InjectionCycles: its owner and the component registered as its type are both on the cycle) is not reported here - the cycle is E08190, and no registration order could satisfy it.
  • Constructor Details

    • UnsatisfiedInjectionReporter

      UnsatisfiedInjectionReporter()
  • Method Details

    • checkAggregateAndFieldTypes

      void checkAggregateAndFieldTypes(AggregateSymbol aggregate, Set<String> availableTypes, Set<String> allRegisteredTypes, IToken triggerToken, ErrorListener errorListener, Set<String> visited, InjectionCycles cycles)
      Check an aggregate's own injection fields and also the injection fields of any aggregate types referenced by its properties (field types) and supers. The visited set guards against cycles. Diagnostics are emitted via the supplied ErrorListener.
    • checkInjectionsAvailable

      void checkInjectionsAvailable(String aggName, Set<ISymbol> injections, Set<String> availableTypes, Set<String> allRegisteredTypes, IToken triggerToken, ErrorListener errorListener)
      Report the injections (of a type, or in a callable's body) that are not available at the trigger: never registered (E08210) or not yet registered (E08200). aggName names where they are declared.