Interface AnnotationBuilder
-
public interface AnnotationBuilder
Builder for annotations of given type. Expected usage is:- create the builder using
of(Class)
orof(ClassInfo)
; - use the
value()
andmember()
methods to define annotation members; - call
build()
to create anAnnotationInfo
.
Note that values of all members of given annotation type must be defined before calling
build()
, except of annotation members that declare a default value. If a value is not defined for an annotation member that does not have a default value,build()
will throw an exception.Defining values of members that do not exist on given annotation type is possible, and such members will be retained in the resulting
AnnotationInfo
. However, if thatAnnotationInfo
is later transformed to an instance of the annotation type, the non-existing members will disappear.- Since:
- 4.0
- create the builder using
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AnnotationInfo
build()
Returns anAnnotationInfo
that includes all annotation members defined by previous method calls on this builder.AnnotationBuilder
member(String name, boolean value)
Adds a boolean-valued annotation member with givenname
.AnnotationBuilder
member(String name, boolean[] values)
Adds a boolean array-valued annotation member with givenname
.AnnotationBuilder
member(String name, byte value)
Adds a byte-valued annotation member with givenname
.AnnotationBuilder
member(String name, byte[] values)
Adds a byte array-valued annotation member with givenname
.AnnotationBuilder
member(String name, char value)
Adds a char-valued annotation member with givenname
.AnnotationBuilder
member(String name, char[] values)
Adds a char array-valued annotation member with givenname
.AnnotationBuilder
member(String name, double value)
Adds a double-valued annotation member with givenname
.AnnotationBuilder
member(String name, double[] values)
Adds a double array-valued annotation member with givenname
.AnnotationBuilder
member(String name, float value)
Adds a float-valued annotation member with givenname
.AnnotationBuilder
member(String name, float[] values)
Adds a float array-valued annotation member with givenname
.AnnotationBuilder
member(String name, int value)
Adds an int-valued annotation member with givenname
.AnnotationBuilder
member(String name, int[] values)
Adds an int array-valued annotation member with givenname
.AnnotationBuilder
member(String name, long value)
Adds a long-valued annotation member with givenname
.AnnotationBuilder
member(String name, long[] values)
Adds a long array-valued annotation member with givenname
.AnnotationBuilder
member(String name, short value)
Adds a short-valued annotation member with givenname
.AnnotationBuilder
member(String name, short[] values)
Adds a short array-valued annotation member with givenname
.AnnotationBuilder
member(String name, AnnotationInfo value)
Adds an annotation-valued annotation member with givenname
.AnnotationBuilder
member(String name, AnnotationInfo[] values)
Adds an annotation array-valued annotation member with givenname
.AnnotationBuilder
member(String name, AnnotationMember value)
Adds an annotation member with givenname
, whose value is givenvalue
.AnnotationBuilder
member(String name, ClassInfo value)
Adds a class-valued annotation member with givenname
.AnnotationBuilder
member(String name, ClassInfo[] values)
Adds a class array-valued annotation member with givenname
.AnnotationBuilder
member(String name, ClassInfo enumType, String enumValue)
Adds an enum-valued annotation member with givenname
.AnnotationBuilder
member(String name, ClassInfo enumType, String[] enumValues)
Adds an enum array-valued annotation member with givenname
.AnnotationBuilder
member(String name, Type value)
Adds a class-valued annotation member with givenname
.AnnotationBuilder
member(String name, Type[] values)
Adds a class array-valued annotation member with givenname
.AnnotationBuilder
member(String name, Annotation value)
Adds an annotation-valued annotation member with givenname
.AnnotationBuilder
member(String name, Annotation[] values)
Adds an annotation array-valued annotation member with givenname
.AnnotationBuilder
member(String name, Class<?> value)
Adds a class-valued annotation member with givenname
.AnnotationBuilder
member(String name, Class<?>[] values)
Adds a class array-valued annotation member with givenname
.AnnotationBuilder
member(String name, Class<? extends Enum<?>> enumType, String enumValue)
Adds an enum-valued annotation member with givenname
.AnnotationBuilder
member(String name, Class<? extends Enum<?>> enumType, String[] enumValues)
Adds an enum array-valued annotation member with givenname
.AnnotationBuilder
member(String name, Enum<?> value)
Adds an enum-valued annotation member with givenname
.AnnotationBuilder
member(String name, Enum<?>[] values)
Adds an enum array-valued annotation member with givenname
.AnnotationBuilder
member(String name, String value)
Adds a String-valued annotation member with givenname
.AnnotationBuilder
member(String name, String[] values)
Adds a String array-valued annotation member with givenname
.static AnnotationBuilder
of(ClassInfo annotationType)
Returns a newAnnotationBuilder
that builds an annotation of given type.static AnnotationBuilder
of(Class<? extends Annotation> annotationType)
Returns a newAnnotationBuilder
that builds an annotation of given type.default AnnotationBuilder
value(boolean value)
Adds a boolean-valued annotation member calledvalue
.default AnnotationBuilder
value(boolean[] values)
Adds a boolean array-valued annotation member calledvalue
.default AnnotationBuilder
value(byte value)
Adds a byte-valued annotation member calledvalue
.default AnnotationBuilder
value(byte[] values)
Adds a byte array-valued annotation member calledvalue
.default AnnotationBuilder
value(char value)
Adds a char-valued annotation member calledvalue
.default AnnotationBuilder
value(char[] values)
Adds a char array-valued annotation member calledvalue
.default AnnotationBuilder
value(double value)
Adds a double-valued annotation member calledvalue
.default AnnotationBuilder
value(double[] values)
Adds a double array-valued annotation member calledvalue
.default AnnotationBuilder
value(float value)
Adds a float-valued annotation member calledvalue
.default AnnotationBuilder
value(float[] values)
Adds a float array-valued annotation member calledvalue
.default AnnotationBuilder
value(int value)
Adds an int-valued annotation member calledvalue
.default AnnotationBuilder
value(int[] values)
Adds an int array-valued annotation member calledvalue
.default AnnotationBuilder
value(long value)
Adds a long-valued annotation member calledvalue
.default AnnotationBuilder
value(long[] values)
Adds a long array-valued annotation member calledvalue
.default AnnotationBuilder
value(short value)
Adds a short-valued annotation member calledvalue
.default AnnotationBuilder
value(short[] values)
Adds a short array-valued annotation member calledvalue
.default AnnotationBuilder
value(AnnotationInfo value)
Adds an annotation-valued annotation member calledvalue
.default AnnotationBuilder
value(AnnotationInfo[] values)
Adds an annotation array-valued annotation member calledvalue
.default AnnotationBuilder
value(AnnotationMember value)
Adds an annotation member calledvalue
, whose value is givenvalue
.default AnnotationBuilder
value(ClassInfo value)
Adds a class-valued annotation member calledvalue
.default AnnotationBuilder
value(ClassInfo[] values)
Adds a class array-valued annotation member calledvalue
.default AnnotationBuilder
value(ClassInfo enumType, String enumValue)
Adds an enum-valued annotation member calledvalue
.default AnnotationBuilder
value(ClassInfo enumType, String[] enumValues)
Adds an enum array-valued annotation member calledvalue
.default AnnotationBuilder
value(Type value)
Adds a class-valued annotation member calledvalue
.default AnnotationBuilder
value(Type[] values)
Adds a class array-valued annotation member calledvalue
.default AnnotationBuilder
value(Annotation value)
Adds an annotation-valued annotation member calledvalue
.default AnnotationBuilder
value(Annotation[] values)
Adds an annotation array-valued annotation member calledvalue
.default AnnotationBuilder
value(Class<?> value)
Adds a class-valued annotation member calledvalue
.default AnnotationBuilder
value(Class<?>[] values)
Adds a class array-valued annotation member calledvalue
.default AnnotationBuilder
value(Class<? extends Enum<?>> enumType, String enumValue)
Adds an enum-valued annotation member calledvalue
.default AnnotationBuilder
value(Class<? extends Enum<?>> enumType, String[] enumValues)
Adds an enum array-valued annotation member calledvalue
.default AnnotationBuilder
value(Enum<?> value)
Adds an enum-valued annotation member calledvalue
.default AnnotationBuilder
value(Enum<?>[] values)
Adds an enum array-valued annotation member calledvalue
.default AnnotationBuilder
value(String value)
Adds a String-valued annotation member calledvalue
.default AnnotationBuilder
value(String[] values)
Adds a String array-valued annotation member calledvalue
.
-
-
-
Method Detail
-
of
static AnnotationBuilder of(Class<? extends Annotation> annotationType)
Returns a newAnnotationBuilder
that builds an annotation of given type.- Parameters:
annotationType
- the annotation type, must not benull
- Returns:
- a new
AnnotationBuilder
, nevernull
-
of
static AnnotationBuilder of(ClassInfo annotationType)
Returns a newAnnotationBuilder
that builds an annotation of given type.- Parameters:
annotationType
- the annotation type, must not benull
- Returns:
- a new
AnnotationBuilder
-
value
default AnnotationBuilder value(AnnotationMember value)
Adds an annotation member calledvalue
, whose value is givenvalue
.- Parameters:
value
- value of the annotation member- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(boolean value)
Adds a boolean-valued annotation member calledvalue
.- Parameters:
value
- the boolean value- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(boolean[] values)
Adds a boolean array-valued annotation member calledvalue
.- Parameters:
values
- the boolean array, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(byte value)
Adds a byte-valued annotation member calledvalue
.- Parameters:
value
- the byte value- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(byte[] values)
Adds a byte array-valued annotation member calledvalue
.- Parameters:
values
- the byte array, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(short value)
Adds a short-valued annotation member calledvalue
.- Parameters:
value
- the short value- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(short[] values)
Adds a short array-valued annotation member calledvalue
.- Parameters:
values
- the short array, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(int value)
Adds an int-valued annotation member calledvalue
.- Parameters:
value
- the int value- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(int[] values)
Adds an int array-valued annotation member calledvalue
.- Parameters:
values
- the int array, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(long value)
Adds a long-valued annotation member calledvalue
.- Parameters:
value
- the long value- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(long[] values)
Adds a long array-valued annotation member calledvalue
.- Parameters:
values
- the long array, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(float value)
Adds a float-valued annotation member calledvalue
.- Parameters:
value
- the float value- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(float[] values)
Adds a float array-valued annotation member calledvalue
.- Parameters:
values
- the float array, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(double value)
Adds a double-valued annotation member calledvalue
.- Parameters:
value
- the double value- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(double[] values)
Adds a double array-valued annotation member calledvalue
.- Parameters:
values
- the double array, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(char value)
Adds a char-valued annotation member calledvalue
.- Parameters:
value
- the char value- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(char[] values)
Adds a char array-valued annotation member calledvalue
.- Parameters:
values
- the char array, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(String value)
Adds a String-valued annotation member calledvalue
.- Parameters:
value
- the String value, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(String[] values)
Adds a String array-valued annotation member calledvalue
.- Parameters:
values
- the String array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(Enum<?> value)
Adds an enum-valued annotation member calledvalue
.- Parameters:
value
- the enum value, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(Enum<?>[] values)
Adds an enum array-valued annotation member calledvalue
.- Parameters:
values
- the enum array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(Class<? extends Enum<?>> enumType, String enumValue)
Adds an enum-valued annotation member calledvalue
.- Parameters:
enumType
- the enum type, must not benull
enumValue
- name of the enum constant, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(Class<? extends Enum<?>> enumType, String[] enumValues)
Adds an enum array-valued annotation member calledvalue
.- Parameters:
enumType
- the enum type, must not benull
enumValues
- names of the enum constants, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(ClassInfo enumType, String enumValue)
Adds an enum-valued annotation member calledvalue
.- Parameters:
enumType
- the enum type, must not benull
enumValue
- name of the enum constant, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(ClassInfo enumType, String[] enumValues)
Adds an enum array-valued annotation member calledvalue
.- Parameters:
enumType
- the enum type, must not benull
enumValues
- names of the enum constants, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(Class<?> value)
Adds a class-valued annotation member calledvalue
.- Parameters:
value
- the class value, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(Class<?>[] values)
Adds a class array-valued annotation member calledvalue
.- Parameters:
values
- the class array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(ClassInfo value)
Adds a class-valued annotation member calledvalue
.- Parameters:
value
- the class value, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(ClassInfo[] values)
Adds a class array-valued annotation member calledvalue
.- Parameters:
values
- the class array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(Type value)
Adds a class-valued annotation member calledvalue
. Thevalue
parameter may only be:VoidType
;PrimitiveType
;ClassType
;ArrayType
whose element type is eitherPrimitiveType
orClassType
.
- Parameters:
value
- the class value, must not benull
- Returns:
- this
AnnotationBuilder
- Throws:
IllegalArgumentException
- if given type is invalid, as described above
-
value
default AnnotationBuilder value(Type[] values)
Adds a class array-valued annotation member calledvalue
. Thevalues
parameter may only contain:VoidType
;PrimitiveType
;ClassType
;ArrayType
whose element type is eitherPrimitiveType
orClassType
.
- Parameters:
values
- the class array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
- Throws:
IllegalArgumentException
- if any given type is invalid, as described above
-
value
default AnnotationBuilder value(AnnotationInfo value)
Adds an annotation-valued annotation member calledvalue
.- Parameters:
value
- the annotation value, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(AnnotationInfo[] values)
Adds an annotation array-valued annotation member calledvalue
.- Parameters:
values
- the annotation array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(Annotation value)
Adds an annotation-valued annotation member calledvalue
.- Parameters:
value
- the annotation value, must not benull
- Returns:
- this
AnnotationBuilder
-
value
default AnnotationBuilder value(Annotation[] values)
Adds an annotation array-valued annotation member calledvalue
.- Parameters:
values
- the annotation array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, AnnotationMember value)
Adds an annotation member with givenname
, whose value is givenvalue
.- Parameters:
name
- name of the annotation member, must not benull
value
- value of the annotation member, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, boolean value)
Adds a boolean-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the boolean value- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, boolean[] values)
Adds a boolean array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the boolean array, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, byte value)
Adds a byte-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the byte value- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, byte[] values)
Adds a byte array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the byte array, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, short value)
Adds a short-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the short value- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, short[] values)
Adds a short array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the short array, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, int value)
Adds an int-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the int value- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, int[] values)
Adds an int array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the int array, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, long value)
Adds a long-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the long value- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, long[] values)
Adds a long array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the long array, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, float value)
Adds a float-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the float value- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, float[] values)
Adds a float array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the float array, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, double value)
Adds a double-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the double value- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, double[] values)
Adds a double array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the double array, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, char value)
Adds a char-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the char value- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, char[] values)
Adds a char array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the char array, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, String value)
Adds a String-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the String value, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, String[] values)
Adds a String array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the String array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, Enum<?> value)
Adds an enum-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the enum value, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, Enum<?>[] values)
Adds an enum array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the enum array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, Class<? extends Enum<?>> enumType, String enumValue)
Adds an enum-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
enumType
- the enum type, must not benull
enumValue
- name of the enum constant, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, Class<? extends Enum<?>> enumType, String[] enumValues)
Adds an enum array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
enumType
- the enum type, must not benull
enumValues
- names of the enum constants, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, ClassInfo enumType, String enumValue)
Adds an enum-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
enumType
- the enum type, must not benull
enumValue
- name of the enum constant, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, ClassInfo enumType, String[] enumValues)
Adds an enum array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
enumType
- the enum type, must not benull
enumValues
- names of the enum constants, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, Class<?> value)
Adds a class-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the class value, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, Class<?>[] values)
Adds a class array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the class array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, ClassInfo value)
Adds a class-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the class value, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, ClassInfo[] values)
Adds a class array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the class array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, Type value)
Adds a class-valued annotation member with givenname
. Thevalue
parameter may only be:VoidType
;PrimitiveType
;ClassType
;ArrayType
whose element type is eitherPrimitiveType
orClassType
.
- Parameters:
name
- the member name, must not benull
value
- the class value, must not benull
- Returns:
- this
AnnotationBuilder
- Throws:
IllegalArgumentException
- if given type is invalid, as described above
-
member
AnnotationBuilder member(String name, Type[] values)
Adds a class array-valued annotation member with givenname
. Thevalues
parameter may only include:VoidType
;PrimitiveType
;ClassType
;ArrayType
whose element type is eitherPrimitiveType
orClassType
.
- Parameters:
name
- the member name, must not benull
values
- the class array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
- Throws:
IllegalArgumentException
- if any given type is invalid, as described above
-
member
AnnotationBuilder member(String name, AnnotationInfo value)
Adds an annotation-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the annotation value, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, AnnotationInfo[] values)
Adds an annotation array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the annotation array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, Annotation value)
Adds an annotation-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
value
- the annotation value, must not benull
- Returns:
- this
AnnotationBuilder
-
member
AnnotationBuilder member(String name, Annotation[] values)
Adds an annotation array-valued annotation member with givenname
.- Parameters:
name
- the member name, must not benull
values
- the annotation array, must not benull
or containnull
- Returns:
- this
AnnotationBuilder
-
build
AnnotationInfo build()
Returns anAnnotationInfo
that includes all annotation members defined by previous method calls on this builder. Afterbuild()
is called, this builder instance should be discarded.- Returns:
- the built
AnnotationInfo
, nevernull
- Throws:
IllegalStateException
- if a value of some annotation member was not set, and that member does not declare a default value
-
-