Class AbstractBootstrap.Builder<B extends AbstractBootstrap.Builder<B,T>,T extends Bootstrap>

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

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

    • Builder

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

    • config

      public Optional<Config> config()
      Description copied from interface: Bootstrap
      Provides the base primordial bootstrap configuration to the PicoServicesProvider. The provider will then bootstrap PicoServices using this bootstrap instance. then default values will be used accordingly.
      Specified by:
      config in interface Bootstrap
      Returns:
      the bootstrap helidon configuration
    • limitRuntimePhase

      public Optional<Phase> limitRuntimePhase()
      Description copied from interface: Bootstrap
      In certain conditions Pico services should be initialized but not started (i.e., avoiding calls to PostConstruct etc.). This can be used in special cases where the normal Pico startup should limit lifecycle up to a given phase. Normally one should not use this feature - it is mainly used in Pico tooling (e.g., the pico-maven-plugin).
      Specified by:
      limitRuntimePhase in interface Bootstrap
      Returns:
      the phase to stop at during lifecycle
    • config

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

      public B config(Config val)
      Setter for 'config'.
      Parameters:
      val - the new value
      Returns:
      this fluent builder
    • limitRuntimePhase

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

      public B limitRuntimePhase(Phase val)
      Setter for 'limitRuntimePhase'.
      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.Bootstrap, 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