Annotation Interface Prototype.Blueprint

Enclosing class:
Prototype

@Target(TYPE) @Retention(CLASS) public static @interface Prototype.Blueprint
A package local type (by design) that defines getter methods and possible static factory methods that form prototype information that is generated through annotation processing.

The following names are prohibited from being builder properties:

  • build - builder terminating method that builds runtime type from builder, and creates runtime type from prototype
  • buildPrototype - builder terminating method that builds prototype
  • get - same as build, inherited from Supplier
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to use bean style setters and getters, or not (default is not).
    boolean
    Builder can be set to be package local only.
    boolean
    Method create() is created whenever there are no fields required (or all have default values).
    boolean
    Method create(config) is public by default.
    Used to decorate the builder, right before method build is called.
    boolean
    The generated interface is public by default.
  • Element Details

    • isPublic

      boolean isPublic
      The generated interface is public by default. We can switch it to package local by setting this property to false.
      Returns:
      whether the generated interface should be public
      Default:
      true
    • builderPublic

      boolean builderPublic
      Builder can be set to be package local only. In such a case, all handling must be done through other static factory methods (hides the builder from the world).
      Returns:
      whether factory methods to obtain builder should be public on prototype
      Default:
      true
    • createFromConfigPublic

      boolean createFromConfigPublic
      Method create(config) is public by default.
      Returns:
      whether factory method create(config) should be public on prototype
      Default:
      true
    • createEmptyPublic

      boolean createEmptyPublic
      Method create() is created whenever there are no fields required (or all have default values). This property can disable generation of the method.
      Returns:
      whether factory method create() should be created on prototype
      Default:
      true
    • beanStyle

      boolean beanStyle
      Whether to use bean style setters and getters, or not (default is not). If set to true, only methods starting with get would be used, and all setters will start with set, except for add methods.
      Returns:
      whether to use bean style accessors, defaults to false
      Default:
      false
    • decorator

      Class<? extends Prototype.BuilderDecorator> decorator
      Used to decorate the builder, right before method build is called. Validations are done AFTER the decorator is handled. This class may be package local if located in the same package as blueprint. The class must have accessible constructor with no parameters.
      Returns:
      decorator type
      Default:
      io.helidon.builder.api.Prototype.BuilderDecorator.class