Class Parameter.Builder

java.lang.Object
io.spring.initializr.generator.language.Parameter.Builder
Enclosing class:
Parameter

public static class Parameter.Builder extends Object
Builder for creating a Parameter.
  • Method Details

    • type

      public Parameter.Builder type(ClassName type)
      Specify the type of the parameter.
      Parameters:
      type - the type
      Returns:
      this for method chaining
    • type

      public Parameter.Builder type(Class<?> type)
      Specify the type of the parameter.
      Parameters:
      type - the type
      Returns:
      this for method chaining
    • type

      public Parameter.Builder type(String type)
      Specify the type of the parameter.
      Parameters:
      type - the type
      Returns:
      this for method chaining
    • annotate

      public Parameter.Builder annotate(ClassName className)
      Annotate the parameter with the specified annotation.
      Parameters:
      className - the class of the annotation
      Returns:
      this for method chaining
    • annotate

      public Parameter.Builder annotate(ClassName className, Consumer<Annotation.Builder> annotation)
      Annotate the parameter with the specified annotation, customized by the specified consumer.
      Parameters:
      className - the class of the annotation
      annotation - a consumer of the builder
      Returns:
      this for method chaining
    • build

      public Parameter build()