Class Parameter.Builder

java.lang.Object
io.helidon.codegen.classmodel.Parameter.Builder
All Implemented Interfaces:
Builder<Parameter.Builder,Parameter>, Supplier<Parameter>
Enclosing class:
Parameter

public static final class Parameter.Builder extends Object
Fluent API builder for Parameter.
  • Method Details

    • build

      public Parameter build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Returns:
      instance of the built type
    • vararg

      public Parameter.Builder vararg(boolean vararg)
      Whether this parameter is a vararg (zero to n repetitions, declared as Object... objects). Note that vararg parameter can be only one per method, and it MUST be the last argument defined.
      Parameters:
      vararg - whether this is a vararg parameter
      Returns:
      updated builder instance
    • description

      public Parameter.Builder description(List<String> description)
    • type

      public Parameter.Builder type(TypeName type)
    • type

      public Parameter.Builder type(String type)
    • type

      public Parameter.Builder type(Class<?> type)
    • description

      public Parameter.Builder description(String description)
    • addDescriptionLine

      public Parameter.Builder addDescriptionLine(String line)
    • addAnnotation

      public Parameter.Builder addAnnotation(Annotation annotation)
      Add new annotation to the component.
      Parameters:
      annotation - annotation instance
      Returns:
      updated builder instance
    • addAnnotation

      public Parameter.Builder addAnnotation(Consumer<Annotation.Builder> consumer)
      Add new annotation to the component.
      Parameters:
      consumer - annotation builder consumer
      Returns:
      updated builder instance
    • addAnnotation

      public Parameter.Builder addAnnotation(Annotation.Builder builder)
      Add new annotation to the component.
      Parameters:
      builder - annotation builder
      Returns:
      updated builder instance
    • addAnnotation

      public Parameter.Builder addAnnotation(Annotation annotation)
      Add new annotation to the component.
      Parameters:
      annotation - annotation instance
      Returns:
      updated builder instance
    • name

      public Parameter.Builder name(String name)
    • includeImport

      public Parameter.Builder includeImport(boolean includeImport)
      Whether to include import type information among the imports.
      Parameters:
      includeImport - whether imports should be included
      Returns:
      updated builder instance