Class OptionConfigured.BuilderBase<BUILDER extends OptionConfigured.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OptionConfigured>

java.lang.Object
io.helidon.builder.codegen.OptionConfigured.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
OptionConfigured.Builder
Enclosing interface:
OptionConfigured

public abstract static class OptionConfigured.BuilderBase<BUILDER extends OptionConfigured.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OptionConfigured> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for OptionConfigured.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(OptionConfigured prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(OptionConfigured.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • configKey

      public BUILDER configKey(String configKey)
      Config key to use.
      Parameters:
      configKey - config key
      Returns:
      updated builder instance
      See Also:
    • merge

      public BUILDER merge(boolean merge)
      Whether to merge the key with the current object.
      Parameters:
      merge - whether to merge, defaults to false, i.e. this option will have its own key, named configKey()
      Returns:
      updated builder instance
      See Also:
    • traverse

      public BUILDER traverse(boolean traverse)
      Whether to traverse the config node when creating a map.
      Parameters:
      traverse - whether to traverse config, defaults to true
      Returns:
      updated builder instance
      See Also:
    • clearFactoryMethod

      public BUILDER clearFactoryMethod()
      Clear existing value of factoryMethod.
      Returns:
      updated builder instance
      See Also:
    • factoryMethod

      public BUILDER factoryMethod(FactoryMethod factoryMethod)
      Factory method for this option. Factory method will be discovered from PrototypeInfo.configFactories().
      Parameters:
      factoryMethod - config factory method if defined
      Returns:
      updated builder instance
      See Also:
    • factoryMethod

      public BUILDER factoryMethod(Consumer<FactoryMethod.Builder> consumer)
      Factory method for this option. Factory method will be discovered from PrototypeInfo.configFactories().
      Parameters:
      consumer - consumer of builder of config factory method if defined
      Returns:
      updated builder instance
      See Also:
    • factoryMethod

      public BUILDER factoryMethod(Supplier<? extends FactoryMethod> supplier)
      Factory method for this option. Factory method will be discovered from PrototypeInfo.configFactories().
      Parameters:
      supplier - supplier of config factory method if defined
      Returns:
      updated builder instance
      See Also:
    • configKey

      public Optional<String> configKey()
      Config key to use.
      Returns:
      config key
    • merge

      public boolean merge()
      Whether to merge the key with the current object.
      Returns:
      whether to merge, defaults to false, i.e. this option will have its own key, named configKey()
    • traverse

      public boolean traverse()
      Whether to traverse the config node when creating a map.
      Returns:
      whether to traverse config, defaults to true
    • factoryMethod

      public Optional<FactoryMethod> factoryMethod()
      Factory method for this option. Factory method will be discovered from PrototypeInfo.configFactories().
      Returns:
      config factory method if defined
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.