Class Annotation.Builder

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

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

    • build

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

      public Annotation.Builder type(TypeName type)
    • type

      public Annotation.Builder type(String type)
    • type

      public Annotation.Builder type(Class<?> type)
    • addParameter

      public Annotation.Builder addParameter(String name, Object value)
      Adds annotation parameter.
      Parameters:
      name - annotation parameter name
      value - parameter value
      Returns:
      updated builder instance
    • addParameter

      public Annotation.Builder addParameter(Consumer<AnnotationParameter.Builder> consumer)
      Adds annotation parameter.
      Parameters:
      consumer - annotation parameter builder consumer
      Returns:
      updated builder instance
    • addParameter

      public Annotation.Builder addParameter(AnnotationParameter.Builder builder)
      Adds annotation parameter.
      Parameters:
      builder - annotation parameter builder
      Returns:
      updated builder instance
    • addParameter

      public Annotation.Builder addParameter(AnnotationParameter parameter)
      Adds annotation parameter.
      Parameters:
      parameter - annotation parameter
      Returns:
      updated builder instance
    • includeImport

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