Class FactoryMethod.Builder
java.lang.Object
io.helidon.builder.codegen.FactoryMethod.BuilderBase<FactoryMethod.Builder, FactoryMethod>
io.helidon.builder.codegen.FactoryMethod.Builder
- All Implemented Interfaces:
Prototype.Builder<FactoryMethod.Builder, FactoryMethod>, Builder<FactoryMethod.Builder, FactoryMethod>, Supplier<FactoryMethod>
- Enclosing interface:
FactoryMethod
public static class FactoryMethod.Builder
extends FactoryMethod.BuilderBase<FactoryMethod.Builder, FactoryMethod>
implements Builder<FactoryMethod.Builder, FactoryMethod>
Fluent API builder for
FactoryMethod.-
Nested Class Summary
Nested classes/interfaces inherited from class FactoryMethod.BuilderBase
FactoryMethod.BuilderBase.FactoryMethodImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Methods inherited from class FactoryMethod.BuilderBase
clearOptionName, clearParameterType, declaringType, declaringType, declaringType, declaringType, from, from, methodName, methodName, optionName, optionName, parameterType, parameterType, parameterType, parameterType, preBuildPrototype, returnType, returnType, returnType, returnType, toString, validatePrototypeModifier and TypeMethodDescriptionClear existing value of optionName.Clear existing value of parameterType.Type declaring the factory method.declaringType(TypeName declaringType) Type declaring the factory method.declaringType(Consumer<TypeName.Builder> consumer) Type declaring the factory method.declaringType(Supplier<? extends TypeName> supplier) Type declaring the factory method.from(FactoryMethod prototype) Update this builder from an existing prototype instance.from(FactoryMethod.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Name of the factory method.methodName(String methodName) Name of the factory method.A factory method may be bound to a specific option.optionName(String optionName) A factory method may be bound to a specific option.A parameter of the factory method, if any.parameterType(TypeName parameterType) A parameter of the factory method, if any.parameterType(Consumer<TypeName.Builder> consumer) A parameter of the factory method, if any.parameterType(Supplier<? extends TypeName> supplier) A parameter of the factory method, if any.protected voidHandles providers and decorators.Return type of the factory method.returnType(TypeName returnType) Return type of the factory method.returnType(Consumer<TypeName.Builder> consumer) Return type of the factory method.returnType(Supplier<? extends TypeName> supplier) Return type of the factory method.toString()protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault FactoryMethodget()default FactoryMethod.Builderidentity()Instance of this builder as the correct type.default FactoryMethod.Builderupdate(Consumer<FactoryMethod.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault FactoryMethod.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Description copied from interface:Prototype.BuilderCreate an instance of thePrototype. This method is available on all generated builders forPrototype.Blueprint.Calling this method may update the builder from providers and decorators, so repeated calls may have side effects such as repeated provider discovery.
- Specified by:
buildPrototypein interfacePrototype.Builder<FactoryMethod.Builder, FactoryMethod>- Returns:
- an instance of the setup object created from this builder
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<FactoryMethod.Builder, FactoryMethod>- Returns:
- instance of the built type
-