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 classDefine an attribute of an annotation.static final classBuilder 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 theClassNameof the annotation.Return the imports this instance contributes.static Annotation.BuilderInitialize an annotationAnnotation.Builderfor the specified class name.voidwrite(IndentingWriter writer, CodeBlock.FormattingOptions options) Write this annotation using the specified writer.
-
Method Details
-
getClassName
Return theClassNameof 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.Builderfor 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
-