Module io.helidon.builder.api
Package io.helidon.builder.api
Annotation Interface Prototype.RuntimeTypeFactoryMethod
- Enclosing class:
Prototype
Factory method that creates an option from a prototype instance.
The prototype (the only parameter) must be a type that has
builder method that returns a builder,
that can be built using build method (method names are customizable).
The return type of the method must match the type of the option.
This annotation MUST be on a static method that is part of a type referenced from blueprint through
Prototype.CustomMethods.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionName of the builder method on the prototype.Class<?> Type of the class declaring abuilderMethodName()used to get an instance of the builder to send to the generated setter with consumer.Class<?> Type of the builder to use when creating the prototype instance.Name of the build method on the builder to create an instance of the desired type.An explicit option name can be defined to only use this factory method for the specified option.
-
Element Details
-
value
String valueAn explicit option name can be defined to only use this factory method for the specified option. If none is specified, the factory method will be used for all options of the matching type.- Returns:
- option name
- Default:
""
-
builderMethodName
String builderMethodNameName of the builder method on the prototype. If set to<init>, the builder will be created through its constructor, in such a casebuilderType()must be provided as well.- Returns:
- builder method name, defaults to
builderif not set
- Default:
"builder"
-
buildMethodName
String buildMethodNameName of the build method on the builder to create an instance of the desired type.- Returns:
- build method name, defaults to
buildif not set
- Default:
"build"
-
builderType
Class<?> builderTypeType of the builder to use when creating the prototype instance.- Returns:
- type of the builder, defaults to the type returned by the
builderMethodName()
- Default:
io.helidon.builder.api.Prototype.RuntimeTypeFactoryMethod.class
-
builderMethodType
Class<?> builderMethodTypeType of the class declaring abuilderMethodName()used to get an instance of the builder to send to the generated setter with consumer.- Returns:
- type declaring the builder method
- Default:
io.helidon.builder.api.Prototype.RuntimeTypeFactoryMethod.class
-