Class Annotation
java.lang.Object
io.spring.initializr.generator.language.Annotation
An annotation.
- Author:
- Andy Wilkinson, Stephane Nicoll
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Define an attribute of an annotation.static final class
Builder for creating anAnnotation
. -
Method Summary
Modifier and TypeMethodDescriptionReturn the attributes of the annotation or an empty list if the annotation has no defined attribute.Return theClassName
of the annotation.Return the imports this instance contributes.static Annotation.Builder
Initialize an annotationAnnotation.Builder
for the specified class name.void
write
(IndentingWriter writer, CodeBlock.FormattingOptions options) Write this annotation using the specified writer.
-
Method Details
-
getClassName
Return theClassName
of the annotation.- Returns:
- the class name
-
getAttributes
Return the attributes of the annotation or an empty list if the annotation has no defined attribute.- Returns:
- the attributes
-
getImports
Return the imports this instance contributes.- Returns:
- the imports.
-
of
Initialize an annotationAnnotation.Builder
for the specified class name.- Parameters:
className
- the class name of the annotation- Returns:
- a builder
-
write
Write this annotation using the specified writer.- Parameters:
writer
- the writer to useoptions
- the formatting options to use
-