Class AbstractInjectorOptions.Builder<B extends AbstractInjectorOptions.Builder<B,T>,T extends InjectorOptions>

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

public abstract static class AbstractInjectorOptions.Builder<B extends AbstractInjectorOptions.Builder<B,T>,T extends InjectorOptions> extends InjectorOptions implements Builder<B,T>
Fluent API builder for T.
  • Constructor Details

    • Builder

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

    • strategy

      public Injector.Strategy strategy()
      Description copied from class: InjectorOptions
      The strategy the injector should apply. The default is Injector.Strategy.ANY.
      Specified by:
      strategy in class InjectorOptions
      Returns:
      the injector strategy to use
    • activationRequest

      public ActivationRequest activationRequest()
      Description copied from class: InjectorOptions
      Optionally, customized activator options to use for the Activator.
      Specified by:
      activationRequest in class InjectorOptions
      Returns:
      activator options, or leave blank to use defaults
    • strategy

      public B strategy(Injector.Strategy val)
      Setter for 'strategy'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • activationRequest

      public B activationRequest(ActivationRequest val)
      Setter for 'activationRequest'.
      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.api.InjectorOptions, 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