Class TypeInfo.BuilderBase<BUILDER extends TypeInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends TypeInfo>
- 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:
TypeInfo.Builder
- Enclosing interface:
TypeInfo
TypeInfo
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAccess modifier.accessModifier
(AccessModifier accessModifier) Access modifier.addAnnotation
(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.addElementInfo
(TypedElementInfo elementInfo) The elements that make up the type that are relevant for processing.addElementInfo
(Consumer<TypedElementInfo.Builder> consumer) The elements that make up the type that are relevant for processing.addElementInfo
(List<? extends TypedElementInfo> elementInfo) The elements that make up the type that are relevant for processing.addElementModifier
(Modifier elementModifier) Type modifiers.addElementModifiers
(Set<? extends Modifier> elementModifiers) Type modifiers.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.addInterfaceTypeInfo
(TypeInfo interfaceTypeInfo) The interface classes for this type info.addInterfaceTypeInfo
(Consumer<TypeInfo.Builder> consumer) The interface classes for this type info.addInterfaceTypeInfo
(List<? extends TypeInfo> interfaceTypeInfo) The interface classes for this type info.addModifier
(String modifier) Deprecated, for removal: This API element is subject to removal in a future version.addModifiers
(Set<? extends String> modifiers) Element modifiers.addOtherElementInfo
(TypedElementInfo otherElementInfo) The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.addOtherElementInfo
(Consumer<TypedElementInfo.Builder> consumer) The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.addOtherElementInfo
(List<? extends TypedElementInfo> otherElementInfo) The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.addReferencedModuleNames
(Map<? extends TypeName, ? extends String> referencedModuleNames) This method keeps existing values, then puts all new values into the map.addReferencedTypeNamesToAnnotation
(TypeName key, Annotation referencedTypeNamesToAnnotation) This method adds a new value to the map value, or creates a new value.addReferencedTypeNamesToAnnotations
(TypeName key, List<Annotation> referencedTypeNamesToAnnotations) This method adds a new value to the map value, or creates a new value.addReferencedTypeNamesToAnnotations
(Map<? extends TypeName, List<Annotation>> referencedTypeNamesToAnnotations) This method keeps existing values, then puts all new values into the map.List of declared and known annotations for this element.annotations
(List<? extends Annotation> annotations) List of declared and known annotations for this element.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Description, such as javadoc, if available.description
(String description) Description, such as javadoc, if available.The elements that make up the type that are relevant for processing.elementInfo
(List<? extends TypedElementInfo> elementInfo) The elements that make up the type that are relevant for processing.Type modifiers.elementModifiers
(Set<? extends Modifier> elementModifiers) Type modifiers.Update this builder from an existing prototype instance.from
(TypeInfo.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.List of all inherited annotations for this element.inheritedAnnotations
(List<? extends Annotation> inheritedAnnotations) List of all inherited annotations for this element.The interface classes for this type info.interfaceTypeInfo
(List<? extends TypeInfo> interfaceTypeInfo) The interface classes for this type info.kind()
The kind of this type.kind
(ElementKind kind) The kind of this type.Deprecated, for removal: This API element is subject to removal in a future version.useelementModifiers()
insteadElement modifiers.module()
Module of this type, if available.Module of this type, if available.The element used to create this instance.originatingElement
(Object originatingElement) The element used to create this instance.The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.otherElementInfo
(List<? extends TypedElementInfo> otherElementInfo) The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.protected void
Handles providers and decorators.putReferencedModuleName
(TypeName key, String referencedModuleName) This method adds a new value to the map, or replaces it if the key already exists.putReferencedTypeNamesToAnnotation
(TypeName key, List<Annotation> referencedTypeNamesToAnnotation) This method adds a new value to the map, or replaces it if the key already exists.Populated if the (external) module name containing the type is known.referencedModuleNames
(Map<? extends TypeName, ? extends String> referencedModuleNames) This method replaces all values with the new ones.Any Map, List, Set, or method that hasTypeNameBlueprint.typeArguments()
will be analyzed and any type arguments will have its annotations added here.referencedTypeNamesToAnnotations
(Map<? extends TypeName, List<Annotation>> referencedTypeNamesToAnnotations) This method replaces all values with the new ones.The parent/super class for this type info.superTypeInfo
(TypeInfo superTypeInfo) The parent/super class for this type info.superTypeInfo
(Consumer<TypeInfo.Builder> consumer) The parent/super class for this type info.toString()
typeKind()
Deprecated, for removal: This API element is subject to removal in a future version.usekind()
insteadDeprecated, for removal: This API element is subject to removal in a future version.usekind()
insteadtypeName()
The type name.The type name.typeName
(Consumer<TypeName.Builder> consumer) The type name.The type name.protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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.- 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
-
typeName
The type name.- Parameters:
typeName
- the type name- Returns:
- updated builder instance
- See Also:
-
typeName
The type name.- Parameters:
consumer
- consumer of builder for the type name- Returns:
- updated builder instance
- See Also:
-
typeName
The type name.- Parameters:
supplier
- supplier of the type name- Returns:
- updated builder instance
- See Also:
-
clearDescription
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
description
Description, such as javadoc, if available.- Parameters:
description
- description of this element- Returns:
- updated builder instance
- See Also:
-
typeKind
Deprecated, for removal: This API element is subject to removal in a future version.usekind()
insteadThe type element kind.Such as
- "INTERFACE"
- "ANNOTATION_TYPE"
- and other constants on
TypeValues
- Parameters:
typeKind
- the type element kind.- Returns:
- updated builder instance
- See Also:
-
kind
The kind of this type.Such as:
- Parameters:
kind
- element kind of this type- Returns:
- updated builder instance
- See Also:
-
elementInfo
The elements that make up the type that are relevant for processing.- Parameters:
elementInfo
- the elements that make up the type that are relevant for processing- Returns:
- updated builder instance
- See Also:
-
addElementInfo
The elements that make up the type that are relevant for processing.- Parameters:
elementInfo
- the elements that make up the type that are relevant for processing- Returns:
- updated builder instance
- See Also:
-
addElementInfo
The elements that make up the type that are relevant for processing.- Parameters:
elementInfo
- the elements that make up the type that are relevant for processing- Returns:
- updated builder instance
- See Also:
-
addElementInfo
The elements that make up the type that are relevant for processing.- Parameters:
consumer
- the elements that make up the type that are relevant for processing- Returns:
- updated builder instance
- See Also:
-
otherElementInfo
The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.- Parameters:
otherElementInfo
- the elements that still make up the type, but are otherwise deemed irrelevant for processing- Returns:
- updated builder instance
- See Also:
-
addOtherElementInfo
The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.- Parameters:
otherElementInfo
- the elements that still make up the type, but are otherwise deemed irrelevant for processing- Returns:
- updated builder instance
- See Also:
-
addOtherElementInfo
The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.- Parameters:
otherElementInfo
- the elements that still make up the type, but are otherwise deemed irrelevant for processing- Returns:
- updated builder instance
- See Also:
-
addOtherElementInfo
The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.- Parameters:
consumer
- the elements that still make up the type, but are otherwise deemed irrelevant for processing- Returns:
- updated builder instance
- See Also:
-
referencedTypeNamesToAnnotations
public BUILDER referencedTypeNamesToAnnotations(Map<? extends TypeName, List<Annotation>> referencedTypeNamesToAnnotations) This method replaces all values with the new ones.- Parameters:
referencedTypeNamesToAnnotations
- all referenced types- Returns:
- updated builder instance
- See Also:
-
addReferencedTypeNamesToAnnotations
public BUILDER addReferencedTypeNamesToAnnotations(Map<? extends TypeName, List<Annotation>> referencedTypeNamesToAnnotations) This method keeps existing values, then puts all new values into the map.- Parameters:
referencedTypeNamesToAnnotations
- all referenced types- Returns:
- updated builder instance
- See Also:
-
addReferencedTypeNamesToAnnotation
public BUILDER addReferencedTypeNamesToAnnotation(TypeName key, Annotation referencedTypeNamesToAnnotation) This method adds a new value to the map value, or creates a new value.- Parameters:
key
- key to add toreferencedTypeNamesToAnnotation
- additional value for the key- Returns:
- updated builder instance
- See Also:
-
addReferencedTypeNamesToAnnotations
public BUILDER addReferencedTypeNamesToAnnotations(TypeName key, List<Annotation> referencedTypeNamesToAnnotations) This method adds a new value to the map value, or creates a new value.- Parameters:
key
- key to add toreferencedTypeNamesToAnnotations
- additional values for the key- Returns:
- updated builder instance
- See Also:
-
putReferencedTypeNamesToAnnotation
public BUILDER putReferencedTypeNamesToAnnotation(TypeName key, List<Annotation> referencedTypeNamesToAnnotation) This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replacereferencedTypeNamesToAnnotation
- new value for the key- Returns:
- updated builder instance
- See Also:
-
referencedModuleNames
public BUILDER referencedModuleNames(Map<? extends TypeName, ? extends String> referencedModuleNames) This method replaces all values with the new ones.- Parameters:
referencedModuleNames
- type names to its associated defining module name- Returns:
- updated builder instance
- See Also:
-
addReferencedModuleNames
public BUILDER addReferencedModuleNames(Map<? extends TypeName, ? extends String> referencedModuleNames) This method keeps existing values, then puts all new values into the map.- Parameters:
referencedModuleNames
- type names to its associated defining module name- Returns:
- updated builder instance
- See Also:
-
putReferencedModuleName
This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key
- key to add or replacereferencedModuleName
- new value for the key- Returns:
- updated builder instance
- See Also:
-
clearSuperTypeInfo
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
superTypeInfo
The parent/super class for this type info.- Parameters:
superTypeInfo
- the super type- Returns:
- updated builder instance
- See Also:
-
superTypeInfo
The parent/super class for this type info.- Parameters:
consumer
- the super type- Returns:
- updated builder instance
- See Also:
-
interfaceTypeInfo
The interface classes for this type info.- Parameters:
interfaceTypeInfo
- the interface type info- Returns:
- updated builder instance
- See Also:
-
addInterfaceTypeInfo
The interface classes for this type info.- Parameters:
interfaceTypeInfo
- the interface type info- Returns:
- updated builder instance
- See Also:
-
addInterfaceTypeInfo
The interface classes for this type info.- Parameters:
interfaceTypeInfo
- the interface type info- Returns:
- updated builder instance
- See Also:
-
addInterfaceTypeInfo
The interface classes for this type info.- Parameters:
consumer
- the interface type info- Returns:
- updated builder instance
- See Also:
-
modifiers
Element modifiers.- Parameters:
modifiers
- element modifiers- Returns:
- updated builder instance
- See Also:
-
addModifiers
Element modifiers.- Parameters:
modifiers
- element modifiers- Returns:
- updated builder instance
- See Also:
-
addModifier
Deprecated, for removal: This API element is subject to removal in a future version.useelementModifiers()
insteadElement modifiers.- Parameters:
modifier
- element modifiers- Returns:
- updated builder instance
- See Also:
-
elementModifiers
Type modifiers.- Parameters:
elementModifiers
- set of modifiers that are present on the type (and that we understand)- Returns:
- updated builder instance
- See Also:
-
addElementModifiers
Type modifiers.- Parameters:
elementModifiers
- set of modifiers that are present on the type (and that we understand)- Returns:
- updated builder instance
- See Also:
-
addElementModifier
Type modifiers.- Parameters:
elementModifier
- set of modifiers that are present on the type (and that we understand)- Returns:
- updated builder instance
- See Also:
-
accessModifier
Access modifier.- Parameters:
accessModifier
- access modifier- Returns:
- updated builder instance
- See Also:
-
clearModule
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
module
Module of this type, if available.- Parameters:
module
- module name- Returns:
- updated builder instance
- See Also:
-
clearOriginatingElement
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
originatingElement
The element used to create this instance. The type of the object depends on the environment we are in - it may be anTypeElement
in annotation processing, or aClassInfo
when using classpath scanning.- Parameters:
originatingElement
- originating element- Returns:
- updated builder instance
- See Also:
-
annotations
List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as theof the annotation
).- Parameters:
annotations
- the list of annotations declared on this element- Returns:
- updated builder instance
- See Also:
-
addAnnotations
List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as theof the annotation
).- Parameters:
annotations
- the list of annotations declared on this element- Returns:
- updated builder instance
- See Also:
-
addAnnotation
List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as theof the annotation
).- Parameters:
annotation
- the list of annotations declared on this element- Returns:
- updated builder instance
- See Also:
-
addAnnotation
List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as theof the annotation
).- Parameters:
consumer
- the list of annotations declared on this element- Returns:
- updated builder instance
- See Also:
-
inheritedAnnotations
List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked asInherited
.The returned list does not contain
annotations()
. If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.- Parameters:
inheritedAnnotations
- list of all meta annotations of this element- Returns:
- updated builder instance
- See Also:
-
addInheritedAnnotations
List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked asInherited
.The returned list does not contain
annotations()
. If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.- Parameters:
inheritedAnnotations
- list of all meta annotations of this element- Returns:
- updated builder instance
- See Also:
-
addInheritedAnnotation
List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked asInherited
.The returned list does not contain
annotations()
. If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.- Parameters:
inheritedAnnotation
- list of all meta annotations of this element- Returns:
- updated builder instance
- See Also:
-
addInheritedAnnotation
List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked asInherited
.The returned list does not contain
annotations()
. If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.- Parameters:
consumer
- list of all meta annotations of this element- Returns:
- updated builder instance
- See Also:
-
typeName
The type name.- Returns:
- the type name
-
description
Description, such as javadoc, if available.- Returns:
- the description
-
typeKind
Deprecated, for removal: This API element is subject to removal in a future version.usekind()
insteadThe type element kind.Such as
- "INTERFACE"
- "ANNOTATION_TYPE"
- and other constants on
TypeValues
- Returns:
- the type kind
- See Also:
-
kind
The kind of this type.Such as:
- Returns:
- the kind
-
elementInfo
The elements that make up the type that are relevant for processing.- Returns:
- the element info
-
otherElementInfo
The elements that make up this type that are considered "other", or being skipped because they are irrelevant to processing.- Returns:
- the other element info
-
referencedTypeNamesToAnnotations
Any Map, List, Set, or method that hasTypeNameBlueprint.typeArguments()
will be analyzed and any type arguments will have its annotations added here. Note that this only applies to non-built-in types.- Returns:
- the referenced type names to annotations
-
referencedModuleNames
Populated if the (external) module name containing the type is known.- Returns:
- the referenced module names
-
superTypeInfo
The parent/super class for this type info.- Returns:
- the super type info
-
interfaceTypeInfo
The interface classes for this type info.- Returns:
- the interface type info
-
modifiers
Deprecated, for removal: This API element is subject to removal in a future version.useelementModifiers()
insteadElement modifiers.- Returns:
- the modifiers
- See Also:
-
elementModifiers
Type modifiers.- Returns:
- the element modifiers
- See Also:
-
accessModifier
Access modifier.- Returns:
- the access modifier
-
module
Module of this type, if available.- Returns:
- the module
-
originatingElement
The element used to create this instance. The type of the object depends on the environment we are in - it may be anTypeElement
in annotation processing, or aClassInfo
when using classpath scanning.- Returns:
- the originating element
-
annotations
List of declared and known annotations for this element. Note that "known" implies that the annotation is visible, which depends upon the context in which it was build (such as theof the annotation
).- Returns:
- the annotations
-
inheritedAnnotations
List of all inherited annotations for this element. Inherited annotations are annotations declared on annotations of this element that are also marked asInherited
.The returned list does not contain
annotations()
. If a meta-annotation is present on multiple annotations, it will be returned once for each such declaration.- Returns:
- the inherited annotations
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-
elementModifiers()
instead