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
- 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
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis 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.protected void
Handles providers and decorators.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 void
Validates required properties.Configure the value of this annotation (property of namevalue
).values()
Get a key-value of all the annotation properties.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, 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. 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:
-
typeName
The type name, e.g.,Objects
-> "java.util.Objects".- Returns:
- the type name
-
values
Get a key-value of all the annotation properties.- Returns:
- the values
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-