Class AbstractInjectionPlan.Builder<B extends AbstractInjectionPlan.Builder<B,T>,T extends InjectionPlan>

java.lang.Object
io.helidon.pico.spi.AbstractInjectionPlan.Builder<B,T>
Type Parameters:
B - the type of the builder
T - the type of the built instance
All Implemented Interfaces:
Builder<B,T>, InjectionPlan, Supplier<T>
Direct Known Subclasses:
DefaultInjectionPlan.Builder
Enclosing class:
AbstractInjectionPlan

public abstract static class AbstractInjectionPlan.Builder<B extends AbstractInjectionPlan.Builder<B,T>,T extends InjectionPlan> extends Object implements InjectionPlan, Builder<B,T>
Fluent API builder for T.
  • Field Details

    • injectionPointQualifiedServiceProviders

      protected final List injectionPointQualifiedServiceProviders
      Field value for java.util.List<io.helidon.pico.api.ServiceProvider<?>> injectionPointQualifiedServiceProviders().
  • Constructor Details

    • Builder

      protected Builder()
      Fluent API builder constructor.
  • Method Details

    • serviceProvider

      public ServiceProvider<?> serviceProvider()
      Description copied from interface: InjectionPlan
      The service provider this plan pertains to.
      Specified by:
      serviceProvider in interface InjectionPlan
      Returns:
      the service provider this plan pertains to
    • injectionPointInfo

      public InjectionPointInfo injectionPointInfo()
      Description copied from interface: InjectionPlan
      The injection point info for this element, which will also include its identity information.
      Specified by:
      injectionPointInfo in interface InjectionPlan
      Returns:
      the injection point info for this element
    • injectionPointQualifiedServiceProviders

      public List<ServiceProvider<?>> injectionPointQualifiedServiceProviders()
      Description copied from interface: InjectionPlan
      The list of service providers that are qualified to satisfy the given injection point for this service provider.
      Specified by:
      injectionPointQualifiedServiceProviders in interface InjectionPlan
      Returns:
      the qualified service providers for this injection point
    • wasResolved

      public boolean wasResolved()
      Description copied from interface: InjectionPlan
      Flag indicating whether resolution occurred.
      Specified by:
      wasResolved in interface InjectionPlan
      Returns:
      true if resolution occurred
    • resolved

      public Optional<Object> resolved()
      Description copied from interface: InjectionPlan
      The resolved value, set only if InjectionPlan.wasResolved().
      Specified by:
      resolved in interface InjectionPlan
      Returns:
      any resolved value
    • serviceProvider

      public B serviceProvider(ServiceProvider<?> val)
      Setter for 'serviceProvider'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • injectionPointInfo

      public B injectionPointInfo(InjectionPointInfo val)
      Setter for 'injectionPointInfo'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • injectionPointQualifiedServiceProviders

      public B injectionPointQualifiedServiceProviders(Collection<ServiceProvider<?>> val)
      Setter for 'injectionPointQualifiedServiceProviders'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addInjectionPointQualifiedServiceProviders

      public B addInjectionPointQualifiedServiceProviders(Collection<ServiceProvider<?>> val)
      Setter for 'injectionPointQualifiedServiceProviders'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • addInjectionPointQualifiedServiceProvider

      public B addInjectionPointQualifiedServiceProvider(ServiceProvider<?> val)
      Setter for 'injectionPointQualifiedServiceProviders'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • wasResolved

      public B wasResolved(boolean val)
      Setter for 'wasResolved'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • resolved

      public B resolved(Optional<Object> val)
      Setter for 'resolved'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • resolved

      public B resolved(Object val)
      Setter for 'resolved'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • accept

      public B accept(T val)
      Accept and update from the provided value object.
      Parameters:
      val - the value object to copy from
      Returns:
      this instance typed to correct type
    • visitAttributes

      public <T> void visitAttributes(AttributeVisitor<T> visitor, T userDefinedCtx)
      Visits all attributes of io.helidon.pico.spi.InjectionPlan, calling the AttributeVisitor for each.
      Type Parameters:
      T - type of the user defined context
      Parameters:
      visitor - the visitor called for each attribute
      userDefinedCtx - any object you wish to pass to each visit call