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

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

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

    • BuilderBase

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

    • from

      public BUILDER from(GeneratedMethod 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(GeneratedMethod.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
    • method

      public BUILDER method(TypedElementInfo method)
      Definition of this method, including annotations (such as Override).
      Parameters:
      method - method definition
      Returns:
      updated builder instance
      See Also:
    • method

      public BUILDER method(Consumer<TypedElementInfo.Builder> consumer)
      Definition of this method, including annotations (such as Override).
      Parameters:
      consumer - consumer of builder of method definition
      Returns:
      updated builder instance
      See Also:
    • method

      public BUILDER method(Supplier<? extends TypedElementInfo> supplier)
      Definition of this method, including annotations (such as Override).
      Parameters:
      supplier - supplier of method definition
      Returns:
      updated builder instance
      See Also:
    • contentBuilder

      public BUILDER contentBuilder(Consumer<ContentBuilder<?>> contentBuilder)
      Generator for the method content.
      Parameters:
      contentBuilder - content builder consumer
      Returns:
      updated builder instance
      See Also:
    • clearJavadoc

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

      public BUILDER javadoc(Javadoc javadoc)
      Javadoc for this method. We intentionally ignore documentation on method(), as it may be complicated to update it.

      If not configured, no javadoc will be generated (useful for methods that override documented interface methods).

      Parameters:
      javadoc - javadoc for this method if defined
      Returns:
      updated builder instance
      See Also:
    • javadoc

      public BUILDER javadoc(Consumer<Javadoc.Builder> consumer)
      Javadoc for this method. We intentionally ignore documentation on method(), as it may be complicated to update it.

      If not configured, no javadoc will be generated (useful for methods that override documented interface methods).

      Parameters:
      consumer - consumer of builder of javadoc for this method if defined
      Returns:
      updated builder instance
      See Also:
    • javadoc

      public BUILDER javadoc(Supplier<? extends Javadoc> supplier)
      Javadoc for this method. We intentionally ignore documentation on method(), as it may be complicated to update it.

      If not configured, no javadoc will be generated (useful for methods that override documented interface methods).

      Parameters:
      supplier - supplier of javadoc for this method if defined
      Returns:
      updated builder instance
      See Also:
    • method

      public Optional<TypedElementInfo> method()
      Definition of this method, including annotations (such as Override).
      Returns:
      method definition
    • contentBuilder

      public Optional<Consumer<ContentBuilder<?>>> contentBuilder()
      Generator for the method content.
      Returns:
      content builder consumer
    • javadoc

      public Optional<Javadoc> javadoc()
      Javadoc for this method. We intentionally ignore documentation on method(), as it may be complicated to update it.

      If not configured, no javadoc will be generated (useful for methods that override documented interface methods).

      Returns:
      javadoc for this 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.