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

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

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

    • BuilderBase

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

    • from

      public BUILDER from(OptionBuilder 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(OptionBuilder.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
    • builderMethodName

      public BUILDER builderMethodName(String builderMethodName)
      Name of the static builder method, or <init> to identify a constructor should be used. If a method name is defined, it is expected to be on the type of the option. If constructor is defined, it is expected to be an accessible constructor on the builderType().
      Parameters:
      builderMethodName - name of the method
      Returns:
      updated builder instance
      See Also:
    • builderType

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

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

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

      public BUILDER builderMethodType(TypeName builderMethodType)
      Type of the class declaring a builderMethodName() used to get an instance of the builder to send to the generated setter with consumer.
      Parameters:
      builderMethodType - type declaring the builder method
      Returns:
      updated builder instance
      See Also:
    • builderMethodType

      public BUILDER builderMethodType(Consumer<TypeName.Builder> consumer)
      Type of the class declaring a builderMethodName() used to get an instance of the builder to send to the generated setter with consumer.
      Parameters:
      consumer - consumer of builder of type declaring the builder method
      Returns:
      updated builder instance
      See Also:
    • builderMethodType

      public BUILDER builderMethodType(Supplier<? extends TypeName> supplier)
      Type of the class declaring a builderMethodName() used to get an instance of the builder to send to the generated setter with consumer.
      Parameters:
      supplier - supplier of type declaring the builder method
      Returns:
      updated builder instance
      See Also:
    • buildMethodName

      public BUILDER buildMethodName(String buildMethodName)
      Name of the build method (build or buildPrototype).
      Parameters:
      buildMethodName - builder build method name
      Returns:
      updated builder instance
      See Also:
    • builderMethodName

      public String builderMethodName()
      Name of the static builder method, or <init> to identify a constructor should be used. If a method name is defined, it is expected to be on the type of the option. If constructor is defined, it is expected to be an accessible constructor on the builderType().
      Returns:
      name of the method
    • builderType

      public Optional<TypeName> builderType()
      Type of the builder.
      Returns:
      type of the builder
    • builderMethodType

      public Optional<TypeName> builderMethodType()
      Type of the class declaring a builderMethodName() used to get an instance of the builder to send to the generated setter with consumer.
      Returns:
      type declaring the builder method
    • buildMethodName

      public String buildMethodName()
      Name of the build method (build or buildPrototype).
      Returns:
      builder build method name
    • toString

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

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

      protected void validatePrototype()
      Validates required properties.