Interface AnnotationSpec.Builder
- All Known Implementing Classes:
AnnotationSpecImpl.BuilderImpl
- Enclosing interface:
AnnotationSpec
@ClassVersion(sourceVersion="$Id: AnnotationSpec.java 1085 2024-01-05 16:23:28Z tquadrat $")
@API(status=STABLE,
since="0.0.5")
public static sealed interface AnnotationSpec.Builder
permits AnnotationSpecImpl.BuilderImpl
The specification of a builder for an instance of an implementation of
AnnotationSpec.- Author:
- Square,Inc.
- Modified by:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: AnnotationSpec.java 1085 2024-01-05 16:23:28Z tquadrat $
- Since:
- 0.0.5
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.javacomposer.AnnotationSpec.Builder"
-
Method Summary
Modifier and TypeMethodDescriptionaddMember(CharSequence name, String format, Object... args) Adds a building block.addMember(CharSequence name, CodeBlock codeBlock) Adds a building block.build()Creates theAnnotationSpecinstance from the added members.forceInline(boolean flag) Sets a flag that forces the inline presentation of the annotation.
Inline:
-
Method Details
-
addMember
Adds a building block. -
addMember
Adds a building block.- Parameters:
name- The name.codeBlock- TheCodeBlockrepresenting the new member.- Returns:
- This
Builderinstance.
-
build
Creates theAnnotationSpecinstance from the added members.- Returns:
- The built instance.
-
forceInline
Sets a flag that forces the inline presentation of the annotation.
Inline:
Not inline:@Column(name = "updated_at", nullable = false)@Column( name = "updated_at", nullable = false )- Parameters:
flag-truefor the forced inline presentation,falsefor the multi-line presentation.- Returns:
- This
Builderinstance.
-
