Annotation Interface Prototype.FactoryMethod

Enclosing class:
Prototype

@Target({METHOD,TYPE}) @Retention(CLASS) public static @interface Prototype.FactoryMethod
This is an annotation used by Helidon code generator that marks a static method as a factory method.

This annotation must be defined on any static method that should be used as a factory for runtime types from prototypes, and from configuration on Prototype.Blueprint.

This annotation is generated for the following signatures:

  • static Prototype.Builder Prototype.builder() - a method that returns a builder that extends io.helidon.common.Builder, that builds the prototype
  • static Prototype.Builder Prototype.builder(Prototype) - a method that returns a builder populated from existing prototype instance
  • static Prototype create(io.helidon.common.config.Config config) - a method that creates a new instance of prototype from configuration
  • static Prototype create() - a method that creates a new instance if there are no required fields
This annotation is also used for triggering an additional round of annotation processing by the generated types, to finalize validation.