Package io.jonasg.bob

Annotation Interface Buildable


@Retention(SOURCE) @Target(TYPE) public @interface Buildable
Marks a class to be buildable, which will generate a builder for the class.

The builder will have a build method that will create an instance of the annotated class.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    List of fields to be excluded to be included in the builder.
    The package name of the generated builder.
    The setterPrefix for the generated setters.
  • Element Details

    • excludeFields

      String[] excludeFields
      List of fields to be excluded to be included in the builder.
      Returns:
      the list of fields to be excluded to be included in the builder.
      Default:
      {}
    • setterPrefix

      String setterPrefix
      The setterPrefix for the generated setters. For example, "with" or "set" Defaults to no setterPrefix.
      Returns:
      the setterPrefix for the generated setters.
      Default:
      ""
    • packageName

      String packageName
      The package name of the generated builder. Defaults to the package of the annotated class.
      Returns:
      the package name of the generated builder
      Default:
      ""