Module io.helidon.common.types
Package io.helidon.common.types
Class Annotation.BuilderBase<BUILDER extends Annotation.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Annotation>
java.lang.Object
io.helidon.common.types.Annotation.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:
Annotation.Builder,Qualifier.BuilderBase
- Enclosing interface:
Annotation
public abstract static class Annotation.BuilderBase<BUILDER extends Annotation.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends Annotation>
extends Object
implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for
Annotation.-
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 TypeMethodDescriptionaddMetaAnnotation(Annotation metaAnnotation) A list of inherited annotations (from the whole hierarchy).addMetaAnnotation(Consumer<Annotation.Builder> consumer) A list of inherited annotations (from the whole hierarchy).addMetaAnnotations(List<? extends Annotation> metaAnnotations) A list of inherited annotations (from the whole hierarchy).addProperties(Map<String, ? extends AnnotationProperty> properties) Properties defined on this annotation.Deprecated, for removal: This API element is subject to removal in a future version.Clear all metaAnnotations.Clear existing value of originatingElement.from(Annotation prototype) Update this builder from an existing prototype instance.from(Annotation.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.A list of inherited annotations (from the whole hierarchy).metaAnnotations(List<? extends Annotation> metaAnnotations) A list of inherited annotations (from the whole hierarchy).The element used to create this instance.originatingElement(Object originatingElement) The element used to create this instance.protected voidHandles providers and decorators.Properties defined on this annotation.properties(Map<String, ? extends AnnotationProperty> properties) Properties defined on this annotation.Configure the value of an annotation property.putProperty(String key, AnnotationProperty property) Properties defined on this annotation.Deprecated, for removal: This API element is subject to removal in a future version.useAnnotation.properties()instead, and accessor methods on this interfacetoString()Annotation type name from annotation type.typeName()The type name, e.g.,Objects-> "java.util.Objects".The type name, e.g.,Objects-> "java.util.Objects".typeName(Consumer<TypeName.Builder> consumer) The type name, e.g.,Objects-> "java.util.Objects".The type name, e.g.,Objects-> "java.util.Objects".protected voidValidates required properties.Configure the value of this annotation (property of namevalue).values()Deprecated, for removal: This API element is subject to removal in a future version.useAnnotation.properties()instead, and accessor methods on this interfaceDeprecated, for removal: This API element is subject to removal in a future version.useAnnotation.properties()instead, and accessor methods on this interfaceMethods 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
-
type
Annotation type name from annotation type.- Parameters:
annoType- annotation class- Returns:
- updated builder instance
-
value
Configure the value of this annotation (property of namevalue).- Parameters:
value- value of the annotation- Returns:
- updated builder instance
-
property
Configure the value of an annotation property.- Parameters:
name- name of the propertyvalue- value of the property- Returns:
- updated builder instance
-
typeName
The type name, e.g.,Objects-> "java.util.Objects".- Parameters:
typeName- the annotation type name- Returns:
- updated builder instance
- See Also:
-
typeName
The type name, e.g.,Objects-> "java.util.Objects".- Parameters:
consumer- consumer of builder of the annotation type name- Returns:
- updated builder instance
- See Also:
-
typeName
The type name, e.g.,Objects-> "java.util.Objects".- Parameters:
supplier- supplier of the annotation type name- Returns:
- updated builder instance
- See Also:
-
values
Deprecated, for removal: This API element is subject to removal in a future version.useAnnotation.properties()instead, and accessor methods on this interfaceKey-value map of all the annotation properties. This method replaces all values with the new ones.- Parameters:
values- key-value pairs of all the properties present- Returns:
- updated builder instance
- See Also:
-
addValues
Deprecated, for removal: This API element is subject to removal in a future version.useAnnotation.properties()instead, and accessor methods on this interfaceKey-value map of all the annotation properties. This method keeps existing values, then puts all new values into the map.- Parameters:
values- key-value pairs of all the properties present- Returns:
- updated builder instance
- See Also:
-
putValue
Deprecated, for removal: This API element is subject to removal in a future version.useAnnotation.properties()instead, and accessor methods on this interfaceKey-value map of all the annotation properties. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key- key to add or replacevalue- new value for the key- Returns:
- updated builder instance
- See Also:
-
properties
Properties defined on this annotation. This method replaces all values with the new ones.- Parameters:
properties- properties- Returns:
- updated builder instance
- See Also:
-
addProperties
Properties defined on this annotation. This method keeps existing values, then puts all new values into the map.- Parameters:
properties- properties- Returns:
- updated builder instance
- See Also:
-
putProperty
Properties defined on this annotation. This method adds a new value to the map, or replaces it if the key already exists.- Parameters:
key- key to add or replaceproperty- new value for the key- Returns:
- updated builder instance
- See Also:
-
clearMetaAnnotations
Clear all metaAnnotations.- Returns:
- updated builder instance
- See Also:
-
metaAnnotations
A list of inherited annotations (from the whole hierarchy).- Parameters:
metaAnnotations- list of all annotations declared on the annotation type, or inherited from them- Returns:
- updated builder instance
- See Also:
-
addMetaAnnotations
A list of inherited annotations (from the whole hierarchy).- Parameters:
metaAnnotations- list of all annotations declared on the annotation type, or inherited from them- Returns:
- updated builder instance
- See Also:
-
addMetaAnnotation
A list of inherited annotations (from the whole hierarchy).- Parameters:
metaAnnotation- add single list of all annotations declared on the annotation type, or inherited from them- Returns:
- updated builder instance
- See Also:
-
addMetaAnnotation
A list of inherited annotations (from the whole hierarchy).- Parameters:
consumer- consumer of builder for list of all annotations declared on the annotation type, or inherited from them- Returns:
- updated builder instance
- See Also:
-
clearOriginatingElement
Clear existing value of originatingElement.- Returns:
- updated builder instance
- See Also:
-
originatingElement
The element used to create this instance. The type of the object depends on the environment.- Parameters:
originatingElement- originating element- Returns:
- updated builder instance
- See Also:
-
typeName
The type name, e.g.,Objects-> "java.util.Objects".- Returns:
- the annotation type name
-
values
Deprecated, for removal: This API element is subject to removal in a future version.useAnnotation.properties()instead, and accessor methods on this interfaceKey-value map of all the annotation properties.- Returns:
- key-value pairs of all the properties present
-
properties
Properties defined on this annotation.- Returns:
- properties
-
metaAnnotations
A list of inherited annotations (from the whole hierarchy).- Returns:
- list of all annotations declared on the annotation type, or inherited from them
-
originatingElement
The element used to create this instance. The type of the object depends on the environment.- Returns:
- originating element
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-
Annotation.properties()instead, and accessor methods on this interface