Interface InjectionResolver

All Known Implementing Classes:
ConfigDrivenServiceProviderBase

public interface InjectionResolver
Implementors of this contract can assist with resolving injection points.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(io.helidon.inject.api.InjectionPointInfo ipInfo, InjectionServices injectionServices, ServiceProvider<?> serviceProvider, boolean resolveIps)
    Attempts to resolve the injection point info for a given service provider.
  • Method Details

    • resolve

      Optional<Object> resolve(io.helidon.inject.api.InjectionPointInfo ipInfo, InjectionServices injectionServices, ServiceProvider<?> serviceProvider, boolean resolveIps)
      Attempts to resolve the injection point info for a given service provider.

      There are two modes that injection resolvers run through. Phase 1 (resolveIps=false) is during the time when the injection plan is being formulated. This is the time we need to identify which ServiceProvider instances qualify. Phase 2 (resolveIps=true) is during actual resolution, and typically comes during the service activation lifecycle.

      Parameters:
      ipInfo - the injection point being resolved
      injectionServices - the services registry
      serviceProvider - the service provider this pertains to
      resolveIps - flag indicating whether injection points should be resolved
      Returns:
      the resolution for the plan or the injection point, or empty if unable to resolve the injection point context