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.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.toString()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).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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
-
value
-
property
-
typeName
-
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
-
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
-
typeName
-
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
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-