Module io.helidon.builder.api
Package io.helidon.builder.api
Interface Prototype.Builder<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder. seeself()PROTOTYPE- type of the prototype to be built
- All Known Subinterfaces:
Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
- Enclosing class:
Prototype
public static interface Prototype.Builder<BUILDER,PROTOTYPE>
Terminating method of this builder that creates a prototype instance.
If the object is a factory, it has a further method
build, that produces the target runtime instance
created from this builder or setup object instance.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreate an instance of thePrototype.default <T> TresolveBuilder(T instance) Resolve an instance to a built instance (if it is a builder).default BUILDERself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
PROTOTYPE buildPrototype()Create an instance of thePrototype. This method is available on all generated builders forPrototype.Blueprint.- Returns:
- an instance of the setup object created from this builder
-
self
Instance of this builder as the correct type.- Returns:
- this instance typed to correct type
-
resolveBuilder
default <T> T resolveBuilder(T instance) Resolve an instance to a built instance (if it is a builder). This method is used by generated code to ensure that instances passed to us have gone through builder interceptors and required validation.- Type Parameters:
T- type of the parameter- Parameters:
instance- instance to check- Returns:
- the same instance if not a builder, or a built instance
-