Class TypeName.Builder
java.lang.Object
io.helidon.common.types.TypeName.BuilderBase<TypeName.Builder, TypeName>
io.helidon.common.types.TypeName.Builder
- All Implemented Interfaces:
Prototype.Builder<TypeName.Builder, TypeName>, Builder<TypeName.Builder, TypeName>, Supplier<TypeName>
- Enclosing interface:
TypeName
public static class TypeName.Builder
extends TypeName.BuilderBase<TypeName.Builder, TypeName>
implements Builder<TypeName.Builder, TypeName>
Fluent API builder for
TypeName.-
Nested Class Summary
Nested classes/interfaces inherited from class TypeName.BuilderBase
TypeName.BuilderBase.TypeNameImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Methods inherited from class TypeName.BuilderBase
addAnnotation, addAnnotation, addAnnotations, addEnclosingName, addEnclosingNames, addInheritedAnnotation, addInheritedAnnotation, addInheritedAnnotations, addLowerBound, addLowerBound, addLowerBounds, addTypeArgument, addTypeArgument, addTypeArguments, addTypeParameter, addTypeParameters, addUpperBound, addUpperBound, addUpperBounds, annotations, annotations, array, array, className, className, clearAnnotations, clearComponentType, clearEnclosingNames, clearInheritedAnnotations, clearLowerBounds, clearTypeArguments, clearTypeParameters, clearUpperBounds, componentType, componentType, componentType, componentType, enclosingNames, enclosingNames, from, from, generic, generic, inheritedAnnotations, inheritedAnnotations, lowerBounds, lowerBounds, packageName, packageName, preBuildPrototype, primitive, primitive, toString, type, typeArguments, typeArguments, typeParameters, typeParameters, upperBounds, upperBounds, validatePrototype, vararg, vararg, wildcard, wildcardModifier and TypeMethodDescriptionaddAnnotation(Annotation annotation) List of declared and known annotations for this element.addAnnotation(Consumer<Annotation.Builder> consumer) List of declared and known annotations for this element.addAnnotations(List<? extends Annotation> annotations) List of declared and known annotations for this element.addEnclosingName(String enclosingName) Simple names of enclosing classes (if any exist).addEnclosingNames(List<String> enclosingNames) Simple names of enclosing classes (if any exist).addInheritedAnnotation(Annotation inheritedAnnotation) List of all inherited annotations for this element.addInheritedAnnotation(Consumer<Annotation.Builder> consumer) List of all inherited annotations for this element.addInheritedAnnotations(List<? extends Annotation> inheritedAnnotations) List of all inherited annotations for this element.addLowerBound(TypeName lowerBound) Generic types that provide keywordextendswill have a lower bound defined.addLowerBound(Consumer<TypeName.Builder> consumer) Generic types that provide keywordextendswill have a lower bound defined.addLowerBounds(List<? extends TypeName> lowerBounds) Generic types that provide keywordextendswill have a lower bound defined.addTypeArgument(TypeName typeArgument) Returns the list of generic type arguments, or an empty list if no generics are in use.addTypeArgument(Consumer<TypeName.Builder> consumer) Returns the list of generic type arguments, or an empty list if no generics are in use.addTypeArguments(List<? extends TypeName> typeArguments) Returns the list of generic type arguments, or an empty list if no generics are in use.addTypeParameter(String typeParameter) Type parameters associated with the type arguments.addTypeParameters(List<String> typeParameters) Type parameters associated with the type arguments.addUpperBound(TypeName upperBound) Generic types that provide keywordsuperwill have an upper bound defined.addUpperBound(Consumer<TypeName.Builder> consumer) Generic types that provide keywordsuperwill have an upper bound defined.addUpperBounds(List<? extends TypeName> upperBounds) Generic types that provide keywordsuperwill have an upper bound defined.List of declared and known annotations for this element.annotations(List<? extends Annotation> annotations) List of declared and known annotations for this element.booleanarray()Functions similar toClass.isArray().array(boolean array) Functions similar toClass.isArray().Functions similar toClass.getSimpleName().Functions similar toClass.getSimpleName().Clear all annotations.Clear existing value of componentType.Clear all enclosingNames.Clear all inheritedAnnotations.Clear all lowerBounds.Clear all typeArguments.Clear all typeParameters.Clear all upperBounds.Component type of array.componentType(TypeName componentType) Component type of array.componentType(Consumer<TypeName.Builder> consumer) Component type of array.componentType(Supplier<? extends TypeName> supplier) Component type of array.Simple names of enclosing classes (if any exist).enclosingNames(List<String> enclosingNames) Simple names of enclosing classes (if any exist).Update this builder from an existing prototype instance.from(TypeName.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.booleangeneric()Indicates whether this type is using generics.generic(boolean generic) Indicates whether this type is using generics.List of all inherited annotations for this element.inheritedAnnotations(List<? extends Annotation> inheritedAnnotations) List of all inherited annotations for this element.Generic types that provide keywordextendswill have a lower bound defined.lowerBounds(List<? extends TypeName> lowerBounds) Generic types that provide keywordextendswill have a lower bound defined.Functions similar toClass.getPackageName().packageName(String packageName) Functions similar toClass.getPackageName().protected voidHandles providers and decorators.booleanFunctions similar toClass.isPrimitive().primitive(boolean primitive) Functions similar toClass.isPrimitive().toString()Update builder from the provided type.Returns the list of generic type arguments, or an empty list if no generics are in use.typeArguments(List<? extends TypeName> typeArguments) Returns the list of generic type arguments, or an empty list if no generics are in use.Type parameters associated with the type arguments.typeParameters(List<String> typeParameters) Type parameters associated with the type arguments.Generic types that provide keywordsuperwill have an upper bound defined.upperBounds(List<? extends TypeName> upperBounds) Generic types that provide keywordsuperwill have an upper bound defined.protected voidValidates required properties.booleanvararg()If this is a representation ofTypeName.array(), this method can identify that it was declared as a vararg.vararg(boolean vararg) If this is a representation ofTypeName.array(), this method can identify that it was declared as a vararg.booleanwildcard()Indicates whether this type is using wildcard generics.wildcard(boolean wildcard) Indicates whether this type is using wildcard generics.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault TypeNameget()default TypeName.Builderidentity()Instance of this builder as the correct type.default TypeName.Builderupdate(Consumer<TypeName.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault TypeName.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<TypeName.Builder, TypeName>- Returns:
- an instance of the setup object created from this builder
-
build
-