Module io.helidon.builder.codegen
Package io.helidon.builder.codegen
Class FactoryMethod.BuilderBase<BUILDER extends FactoryMethod.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends FactoryMethod>
java.lang.Object
io.helidon.builder.codegen.FactoryMethod.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
- Direct Known Subclasses:
FactoryMethod.Builder
- Enclosing interface:
FactoryMethod
public abstract static class FactoryMethod.BuilderBase<BUILDER extends FactoryMethod.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends FactoryMethod>
extends Object
implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for
FactoryMethod.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
declaringType
Type declaring the factory method.- Parameters:
declaringType- type declaring the factory method- Returns:
- updated builder instance
- See Also:
-
declaringType
Type declaring the factory method.- Parameters:
consumer- consumer of builder of type declaring the factory method- Returns:
- updated builder instance
- See Also:
-
declaringType
Type declaring the factory method.- Parameters:
supplier- supplier of type declaring the factory method- Returns:
- updated builder instance
- See Also:
-
returnType
Return type of the factory method.- Parameters:
returnType- return type of the factory method- Returns:
- updated builder instance
- See Also:
-
returnType
Return type of the factory method.- Parameters:
consumer- consumer of builder of return type of the factory method- Returns:
- updated builder instance
- See Also:
-
returnType
Return type of the factory method.- Parameters:
supplier- supplier of return type of the factory method- Returns:
- updated builder instance
- See Also:
-
methodName
Name of the factory method.- Parameters:
methodName- factory method name- Returns:
- updated builder instance
- See Also:
-
clearParameterType
Clear existing value of parameterType.- Returns:
- updated builder instance
- See Also:
-
parameterType
A parameter of the factory method, if any.- Parameters:
parameterType- parameter type, if any- Returns:
- updated builder instance
- See Also:
-
parameterType
A parameter of the factory method, if any.- Parameters:
consumer- consumer of builder of parameter type, if any- Returns:
- updated builder instance
- See Also:
-
parameterType
A parameter of the factory method, if any.- Parameters:
supplier- supplier of parameter type, if any- Returns:
- updated builder instance
- See Also:
-
clearOptionName
Clear existing value of optionName.- Returns:
- updated builder instance
- See Also:
-
optionName
A factory method may be bound to a specific option.- Parameters:
optionName- name of the option this factory method is bound to, if any- Returns:
- updated builder instance
- See Also:
-
declaringType
Type declaring the factory method.- Returns:
- type declaring the factory method
-
returnType
Return type of the factory method.- Returns:
- return type of the factory method
-
methodName
Name of the factory method.- Returns:
- factory method name
-
parameterType
A parameter of the factory method, if any.- Returns:
- parameter type, if any
-
optionName
A factory method may be bound to a specific option.- Returns:
- name of the option this factory method is bound to, if any
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-