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

java.lang.Object
io.helidon.builder.codegen.PrototypeConstant.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:
PrototypeConstant.Builder
Enclosing interface:
PrototypeConstant

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

    • BuilderBase

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

    • from

      public BUILDER from(PrototypeConstant 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(PrototypeConstant.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
    • name

      public BUILDER name(String name)
      Name of the constant.
      Parameters:
      name - field name
      Returns:
      updated builder instance
      See Also:
    • type

      public BUILDER type(TypeName type)
      Type of the constant.
      Parameters:
      type - field type
      Returns:
      updated builder instance
      See Also:
    • type

      public BUILDER type(Consumer<TypeName.Builder> consumer)
      Type of the constant.
      Parameters:
      consumer - consumer of builder of field type
      Returns:
      updated builder instance
      See Also:
    • type

      public BUILDER type(Supplier<? extends TypeName> supplier)
      Type of the constant.
      Parameters:
      supplier - supplier of field type
      Returns:
      updated builder instance
      See Also:
    • javadoc

      public BUILDER javadoc(Javadoc javadoc)
      Javadoc for the constant.
      Parameters:
      javadoc - javadoc
      Returns:
      updated builder instance
      See Also:
    • javadoc

      public BUILDER javadoc(Consumer<Javadoc.Builder> consumer)
      Javadoc for the constant.
      Parameters:
      consumer - consumer of builder of javadoc
      Returns:
      updated builder instance
      See Also:
    • javadoc

      public BUILDER javadoc(Supplier<? extends Javadoc> supplier)
      Javadoc for the constant.
      Parameters:
      supplier - supplier of javadoc
      Returns:
      updated builder instance
      See Also:
    • content

      public BUILDER content(Consumer<ContentBuilder<?>> content)
      Consumer of the content to generate the constant.
      Parameters:
      content - content builder consumer to generate the constant value
      Returns:
      updated builder instance
      See Also:
    • name

      public Optional<String> name()
      Name of the constant.
      Returns:
      field name
    • type

      public Optional<TypeName> type()
      Type of the constant.
      Returns:
      field type
    • javadoc

      public Optional<Javadoc> javadoc()
      Javadoc for the constant.
      Returns:
      javadoc
    • content

      public Optional<Consumer<ContentBuilder<?>>> content()
      Consumer of the content to generate the constant.
      Returns:
      content builder consumer to generate the constant value
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.