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

java.lang.Object
io.helidon.config.ConfigItem.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:
ConfigItem.Builder
Enclosing interface:
ConfigItem

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

    • BuilderBase

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

    • from

      public BUILDER from(ConfigItem 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(ConfigItem.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
    • cacheItem

      public BUILDER cacheItem(boolean cacheItem)
      Whether to cache this handled config item or not. If overall caching is disabled, this will not turn it on even if set to true.
      Parameters:
      cacheItem - whether to cache handled config item
      Returns:
      updated builder instance
      See Also:
    • item

      public BUILDER item(String item)
      Handled config item.
      Parameters:
      item - config item
      Returns:
      updated builder instance
      See Also:
    • cacheItem

      public boolean cacheItem()
      Whether to cache this handled config item or not. If overall caching is disabled, this will not turn it on even if set to true.
      Returns:
      the cache item
    • item

      public Optional<String> item()
      Handled config item.
      Returns:
      the item
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.