Module io.quarkus.gizmo2
Package io.quarkus.gizmo2.creator
Interface AnnotationCreator<A extends Annotation>
- Type Parameters:
A- the annotation type
public sealed interface AnnotationCreator<A extends Annotation>
A typesafe creator for an annotation body.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAnnotationCreator.AnnotationArrayProperty<A extends Annotation,S extends Annotation> Maps the annotation type to a method which returns an array of other annotations.static interfaceAnnotationCreator.AnnotationProperty<A extends Annotation,S extends Annotation> Maps the annotation type to a method which returns another annotation.static interfaceMaps the annotation type to a method which returnsboolean[].static interfaceAnnotationCreator.BooleanProperty<A extends Annotation>Maps the annotation type to a method which returnsboolean.static interfaceMaps the annotation type to a method which returnsbyte[].static interfaceAnnotationCreator.ByteProperty<A extends Annotation>Maps the annotation type to a method which returnsbyte.static interfaceMaps the annotation type to a method which returnschar[].static interfaceAnnotationCreator.CharProperty<A extends Annotation>Maps the annotation type to a method which returnschar.static interfaceMaps the annotation type to a method which returnsClass[].static interfaceAnnotationCreator.ClassProperty<A extends Annotation>Maps the annotation type to a method which returnsClass.static interfaceMaps the annotation type to a method which returnsdouble[].static interfaceAnnotationCreator.DoubleProperty<A extends Annotation>Maps the annotation type to a method which returnsdouble.static interfaceAnnotationCreator.EnumArrayProperty<A extends Annotation,E extends Enum<E>> Maps the annotation type to a method which returns an array of enum values.static interfaceAnnotationCreator.EnumProperty<A extends Annotation,E extends Enum<E>> Maps the annotation type to a method which returns an enum value.static interfaceMaps the annotation type to a method which returnsfloat[].static interfaceAnnotationCreator.FloatProperty<A extends Annotation>Maps the annotation type to a method which returnsfloat.static interfaceMaps the annotation type to a method which returnsint[].static interfaceAnnotationCreator.IntProperty<A extends Annotation>Maps the annotation type to a method which returnsint.static interfaceMaps the annotation type to a method which returnslong[].static interfaceAnnotationCreator.LongProperty<A extends Annotation>Maps the annotation type to a method which returnslong.static interfaceMaps the annotation type to a method which returnsshort[].static interfaceAnnotationCreator.ShortProperty<A extends Annotation>Maps the annotation type to a method which returnsshort.static interfaceMaps the annotation type to a method which returnsString[].static interfaceAnnotationCreator.StringProperty<A extends Annotation>Maps the annotation type to a method which returnsString. -
Method Summary
Modifier and TypeMethodDescription<S extends Annotation>
voidadd(AnnotationCreator.AnnotationProperty<A, S> prop, Consumer<AnnotationCreator<S>> builder) Add an annotation property for the given method and built value.voidadd(AnnotationCreator.BooleanProperty<A> prop, boolean value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.ByteProperty<A> prop, byte value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.CharProperty<A> prop, char value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.ClassProperty<A> prop, Class<?> value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.ClassProperty<A> prop, ClassDesc value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.DoubleProperty<A> prop, double value) Add an annotation property for the given method and value.<E extends Enum<E>>
voidadd(AnnotationCreator.EnumProperty<A, E> prop, E value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.FloatProperty<A> prop, float value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.IntProperty<A> prop, int value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.LongProperty<A> prop, long value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.ShortProperty<A> prop, short value) Add an annotation property for the given method and value.voidadd(AnnotationCreator.StringProperty<A> prop, String value) Add an annotation property for the given method and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.<E extends Enum<E>>
voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.<S extends Annotation>
voidadd(String name, Class<S> annotationClass, Consumer<AnnotationCreator<S>> builder) Add an annotation property with the given name and built value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidadd(String name, ClassDesc annotationClass, Consumer<AnnotationCreator<Annotation>> builder) Add an annotation property with the given name and built value.voidAdd an annotation property with the given name and value.<S extends Annotation>
voidaddArray(AnnotationCreator.AnnotationArrayProperty<A, S> prop, List<Consumer<AnnotationCreator<S>>> builders) Add an annotation property for the given method and built values.voidaddArray(AnnotationCreator.BooleanArrayProperty<A> prop, boolean... values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.ByteArrayProperty<A> prop, byte... values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.CharArrayProperty<A> prop, char... values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.ClassArrayProperty<A> prop, Class<?>... values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.ClassArrayProperty<A> prop, ClassDesc... values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.DoubleArrayProperty<A> prop, double... values) Add an annotation property for the given method and value.<E extends Enum<E>>
voidaddArray(AnnotationCreator.EnumArrayProperty<A, E> prop, ClassDesc enumClass, String... enumConstants) Add an annotation property for the given method and value.<E extends Enum<E>>
voidaddArray(AnnotationCreator.EnumArrayProperty<A, E> prop, List<E> values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.FloatArrayProperty<A> prop, float... values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.IntArrayProperty<A> prop, int... values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.LongArrayProperty<A> prop, long... values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.ShortArrayProperty<A> prop, short... values) Add an annotation property for the given method and value.voidaddArray(AnnotationCreator.StringArrayProperty<A> prop, String... values) Add an annotation property for the given method and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property for the given method and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.<S extends Annotation>
voidAdd an annotation property with the given name and built values.voidAdd an annotation property with the given name and value.voidAdd an annotation property with the given name and value.voidaddArray(String name, ClassDesc annotationClass, List<Consumer<AnnotationCreator<Annotation>>> builders) Add an annotation property with the given name and built values.voidAdd an annotation property with the given name and value.<E extends Enum<E>>
voidAdd an annotation property with the given name and value.static <A extends Annotation>
Consumer<AnnotationCreator<A>>from(A annotation) Get an annotation builder which adds the given annotation to its given creator.
-
Method Details
-
from
Get an annotation builder which adds the given annotation to its given creator. The builder may be used more than once.- Type Parameters:
A- the annotation type- Parameters:
annotation- the annotation to copy (must not benull)- Returns:
- the annotation builder (not
null)
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value (must not benull)
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value (must not benull)
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value (must not benull)
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)value- the property value (must not benull)
-
add
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)value- the property value
-
add
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)enumClass- the enum classenumConstant- the name of the enum constant
-
add
<S extends Annotation> void add(String name, Class<S> annotationClass, Consumer<AnnotationCreator<S>> builder) Add an annotation property with the given name and built value.- Type Parameters:
S- the annotation type- Parameters:
name- the property name (must not benull)annotationClass- the class of the nested annotation (must not benull)builder- the builder for the nested annotation (must not benull)
-
add
<S extends Annotation> void add(AnnotationCreator.AnnotationProperty<A, S> prop, Consumer<AnnotationCreator<S>> builder) Add an annotation property for the given method and built value.- Type Parameters:
S- the annotation type- Parameters:
prop- the annotation property method (must not benull)builder- the builder for the nested annotation (must not benull)
-
add
Add an annotation property with the given name and built value.- Parameters:
name- the property name (must not benull)annotationClass- the class of the nested annotation (must not benull)builder- the builder for the nested annotation (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)values- the property values (must not benull)
-
addArray
Add an annotation property with the given name and value.- Parameters:
name- the property name (must not benull)enumClass- the enum class (must not benull)enumConstants- the enum constants (must not benull)
-
addArray
<E extends Enum<E>> void addArray(AnnotationCreator.EnumArrayProperty<A, E> prop, ClassDesc enumClass, String... enumConstants) Add an annotation property for the given method and value.- Parameters:
prop- the property method (must not benull)enumClass- the enum class (must not benull)enumConstants- the enum constants (must not benull)
-
addArray
<S extends Annotation> void addArray(String name, Class<S> annotationClass, List<Consumer<AnnotationCreator<S>>> builders) Add an annotation property with the given name and built values.- Type Parameters:
S- the annotation type- Parameters:
name- the property name (must not benull)annotationClass- the class of the nested annotation (must not benull)builders- the builders for the nested annotations (must not benull)
-
addArray
<S extends Annotation> void addArray(AnnotationCreator.AnnotationArrayProperty<A, S> prop, List<Consumer<AnnotationCreator<S>>> builders) Add an annotation property for the given method and built values.- Type Parameters:
S- the annotation type- Parameters:
prop- the annotation property method (must not benull)builders- the builders for the nested annotations (must not benull)
-
addArray
void addArray(String name, ClassDesc annotationClass, List<Consumer<AnnotationCreator<Annotation>>> builders) Add an annotation property with the given name and built values.- Parameters:
name- the property name (must not benull)annotationClass- the class of the nested annotation (must not benull)builders- the builders for the nested annotations (must not benull)
-