Module io.helidon.builder.api
Package io.helidon.builder.api
package io.helidon.builder.api
Support for handling the generation of code for Helidon builders and configured builders.
The starting point is
Prototype.Blueprint
that is used on a package local interface.
This will generate an interface, builder, and an implementation.
A few things to note:
- The target type that is annotated with the blueprint annotation should have all getter-like methods.
- Any static or default method will be ignored during APT processing.
-
ClassDescriptionCustom description.Types used from generated code.Utility methods for equals and hash code of specific cases of field types.Prototype option annotations.Customize access modifier for builder methods.Can be used to define a list of possible values of an option.Allowed values for this option.Mark a getter method as confidential - not suitable to be used in clear text in
toString
method.Mark a prototype option as one that can be read fromConfig
.Define an option decorator.A String default value for a prototype option.A boolean default value for a prototype option.A default value that will be copied verbatim into the sources.A double default value for a prototype option.An integer default value for a prototype option.A long default value for a prototype option.A default value created from a method for a prototype option.Mark an option as deprecated.Mark option as sourced from aServiceLoader
.Mark a getter method as redundant - not important forequals
,hashcode
, and/ortoString
.Mark option as a required option.Useful for marking map properties, where the key and value must have the same generic type.Applying this annotation to aPrototype.Blueprint
-annotated interface method will cause the generated class to also include additional "add*()" methods.Explicitly define a type (may include generics) in case the type is located in the same module, and cannot be inferred correctly by the annotation processor.Prototype is generated from a prototype blueprint, and it is expected to be part of the public API of the module.Adding this annotation in conjunction with thePrototype.Blueprint
on a target interface type or method causes thePrototype.Annotated.value()
be added to the generated implementation class and methods respectfully.Marker interface for the prototype API, usually a generated interface.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.Prototype.Builder<BUILDER,PROTOTYPE> Terminating method of this builder that creates a prototype instance.Provides a contract by which thePrototype.Blueprint
annotated type can be decorated.Annotated static method of a custom methods type to be added to builder.A blueprint annotated with this annotation will create a prototype that can be created from aConfig
instance.Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE> Extension ofPrototype.Builder
that supports configuration.Annotated constant of a custom methods type to be added to prototype interface.Additional methods from this type will be added to the prototype and its builder.A prototypePrototype.Blueprint
may extend this interface to explicitly reference the associated runtime type.This is an annotation used by Helidon code generator that marks a static method as a factory method.Add additional interfaces to implement by the prototype.Provides a way to decorate a single option when it is applied to the builder.Annotated static method of a custom methods type to be added to prototype interface.Types provided by this configured type.Generate support for Service Registry (helidon-service-registry
) for any option that is annotated asOption.Provider
.This class holds all types related to runtime types, configured from prototypes.RuntimeType.Api<T extends Prototype.Api>This type is created from a specific prototype.Mark this runtime type as prototyped by a specific prototype.