Class Annotation.Builder
java.lang.Object
io.spring.initializr.generator.language.Annotation.Builder
- Enclosing class:
- Annotation
Builder for creating an
Annotation
.-
Method Summary
Modifier and TypeMethodDescriptionAdd the specified values to the attribute with the specified name.Deprecated, for removal: This API element is subject to removal in a future version.build()
from
(Annotation annotation) Reset the state of the builder to the state of the specified annotation.Set the attribute with the specified name with the specified values.
-
Method Details
-
attribute
@Deprecated(since="0.22.0", forRemoval=true) public Annotation.Builder attribute(String name, Class<?> type, String... values) Deprecated, for removal: This API element is subject to removal in a future version.as of 0.22.0 in favor ofset(String, Object...)
Set the attribute with the specified name and String representation of the specified values.- Parameters:
name
- the name of the attributetype
- the type of the propertyvalues
- the values to associate with the attribute- Returns:
- this for method chaining
-
set
Set the attribute with the specified name with the specified values. If the attribute exists, it is replaced by the specified values.- Parameters:
name
- the name of the attributevalues
- the values to associate with the attribute- Returns:
- this for method chaining
-
add
Add the specified values to the attribute with the specified name. If the attribute does not exist, it is created with the specified values.- Parameters:
name
- the name of the attributevalues
- the values to add to the attribute- Returns:
- this for method chaining
-
from
Reset the state of the builder to the state of the specified annotation. This effectively replaces all customizations by the specified annotation.- Parameters:
annotation
- the annotation to reset to- Returns:
- this for method chaining
-
build
-
set(String, Object...)