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) This method keeps existing values, then puts all new values into the map.This method keeps existing values, then puts all new values into the map.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).protected voidHandles providers and decorators.List of properties defined on this annotation.properties(Map<String, ? extends AnnotationProperty> properties) This method replaces all values with the new ones.putProperty(String key, AnnotationProperty property) This method adds a new value to the map, or replaces it if the key already exists.This method adds a new value to the map, or replaces it if the key already exists.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).values()Deprecated, for removal: This API element is subject to removal in a future version.This method replaces all values with the new ones.Methods 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
-
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 for 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
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
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
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
This method replaces all values with the new ones.- Parameters:
properties- properties- Returns:
- updated builder instance
- See Also:
-
addProperties
This method keeps existing values, then puts all new values into the map.- Parameters:
properties- properties- Returns:
- updated builder instance
- See Also:
-
putProperty
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:
-
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- 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- list of all annotations declared on the annotation type, or inherited from them- Returns:
- updated builder instance
- See Also:
-
typeName
The type name, e.g.,Objects-> "java.util.Objects".- Returns:
- the type name
-
values
Deprecated, for removal: This API element is subject to removal in a future version.useAnnotationBlueprint.properties()instead, and accessor methods on this interfaceGet a key-value of all the annotation properties.- Returns:
- the values
-
properties
List of properties defined on this annotation.- Returns:
- the properties
-
metaAnnotations
A list of inherited annotations (from the whole hierarchy).- Returns:
- the meta annotations
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-
AnnotationBlueprint.properties()instead, and accessor methods on this interface