Class GenericType.Builder<T>
java.lang.Object
io.helidon.common.GenericType.Builder<T>
- Type Parameters:
T- the generic type parameter
- All Implemented Interfaces:
Builder<GenericType.Builder<T>, GenericType<T>>, Supplier<GenericType<T>>
- Enclosing class:
GenericType<T>
public static final class GenericType.Builder<T>
extends Object
implements Builder<GenericType.Builder<T>, GenericType<T>>
Builder of the Generic type.
-
Method Summary
Modifier and TypeMethodDescriptionaddGenericParameter(GenericType<?> genericParameter) Adds a generic parameter using the provided GenericType.addGenericParameter(Type genericParameter) Adds a generic parameter using the provided Type.addGenericParameter(Consumer<GenericType.Builder<T>> consumer) Adds a generic parameter by building a nested GenericType using the provided consumer.Sets the base type for this generic type.build()Builds the GenericType instance.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault GenericType<T> get()default GenericType.Builder<T> identity()Instance of this builder as the correct type.default GenericType.Builder<T> update(Consumer<GenericType.Builder<T>> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
Builds the GenericType instance.- Specified by:
buildin interfaceBuilder<GenericType.Builder<T>, GenericType<T>>- Returns:
- the built GenericType
-
baseType
Sets the base type for this generic type.- Parameters:
baseType- the base class type- Returns:
- this builder
-
addGenericParameter
Adds a generic parameter using the provided GenericType.- Parameters:
genericParameter- the generic parameter to add- Returns:
- this builder
-
addGenericParameter
Adds a generic parameter using the provided Type.- Parameters:
genericParameter- the generic parameter to add- Returns:
- this builder
-
addGenericParameter
Adds a generic parameter by building a nested GenericType using the provided consumer.- Parameters:
consumer- the consumer to configure the nested builder- Returns:
- this builder
-