Package io.quarkus.gizmo
Interface AnnotationCreator
- All Known Implementing Classes:
AnnotationCreatorImpl
public interface AnnotationCreator
-
Method Summary
Modifier and TypeMethodDescriptiondefault AnnotationCreatorSame asaddValue(String, Object), but returnsthisto allow fluent usage.voidAdd a new annotation element with the givennameandvalue.static AnnotationCreatorReturns anAnnotationCreatorfor annotation of givenannotationType.static AnnotationCreatorReturns anAnnotationCreatorfor annotation of givenannotationType.static AnnotationCreatorof(String annotationType, RetentionPolicy retentionPolicy) Returns anAnnotationCreatorfor annotation of givenannotationTypewhich has givenretentionPolicy.
-
Method Details
-
of
Returns anAnnotationCreatorfor annotation of givenannotationType.Useful for representing nested annotations (see
addValue).- Parameters:
annotationType- class name of the annotation to create, must not benull- Returns:
- an
AnnotationCreator, nevernull
-
of
Returns anAnnotationCreatorfor annotation of givenannotationType.Useful for representing nested annotations (see
addValue).- Parameters:
annotationType- type of the annotation to create, must not benull- Returns:
- an
AnnotationCreator, nevernull
-
of
Returns anAnnotationCreatorfor annotation of givenannotationTypewhich has givenretentionPolicy.Useful for representing nested annotations (see
addValue).- Parameters:
annotationType- class name of the annotation to create, must not benullretentionPolicy- retention policy of the annotation type- Returns:
- an
AnnotationCreator, nevernull
-
add
Same asaddValue(String, Object), but returnsthisto allow fluent usage. -
addValue
Add a new annotation element with the givennameandvalue. The name may be any permissible annotation element name (for example,toStringorannotationTypeare invalid). The value may be:- primitive wrapper type
StringEnumClass- nested annotation as an
AnnotationCreatorcreated usingAnnotationCreator.of(), or as a JandexAnnotationInstance - array of previously mentioned types
AnnotationValue.- Parameters:
name- name of the annotation element to addvalue- value of the annotation element to add
-