Module org.eclipse.xtend.lib.macro
Interface AnnotationReferenceBuildContext
@Beta
public interface AnnotationReferenceBuildContext
Services provided during an annotation reference initialization.
- Since:
- 2.6
- Author:
- Anton Kosyakov
-
Method Summary
Modifier and TypeMethodDescriptionvoidSets the annotation property of the given name Depending of the respective annotation type element, the following values are permitted: Short or short[] Integer or int[] Long or long[] Float or float[] Double or double[] Boolean or boolean[] TypeReference or TypeReference[] - for elements of type Class<?> AnnotationReference or AnnotationReference[] - for elements of an annotation type EnumerationValueDeclaration or EnumerationValueDeclaration[] - for elements of an enum type Expression - for any element type that matches the given expression's type null - will remove any existing value for the given element namevoidsetAnnotationValue(String name, AnnotationReference... value) Sets the given value for the given annotation element name.voidsetBooleanValue(String name, boolean... value) Sets the given value for the given annotation element name.voidsetByteValue(String name, byte... value) Sets the given value for the given annotation element name.voidsetCharValue(String name, char... value) Sets the given value for the given annotation element name.voidsetClassValue(String name, TypeReference... value) Sets the given value for the given annotation element name.voidsetDoubleValue(String name, double... value) Sets the given value for the given annotation element name.voidsetEnumValue(String name, EnumerationValueDeclaration... value) Sets the given value for the given annotation element name.voidsetFloatValue(String name, float... value) Sets the given value for the given annotation element name.voidsetIntValue(String name, int... value) Sets the given value for the given annotation element name.voidsetLongValue(String name, long... value) Sets the given value for the given annotation element name.voidsetShortValue(String name, short... value) Sets the given value for the given annotation element name.voidsetStringValue(String name, String... value) Sets the given value for the given annotation element name.
-
Method Details
-
set
Sets the annotation property of the given name Depending of the respective annotation type element, the following values are permitted:- Short or short[]
- Integer or int[]
- Long or long[]
- Float or float[]
- Double or double[]
- Boolean or boolean[]
- TypeReference or TypeReference[] - for elements of type Class<?>
- AnnotationReference or AnnotationReference[] - for elements of an annotation type
- EnumerationValueDeclaration or EnumerationValueDeclaration[] - for elements of an enum type
- Expression - for any element type that matches the given expression's type
- null - will remove any existing value for the given element name
- Parameters:
name- a valid name of a property of the annotation type.value- an annotation value or null if the annotation value should be removed.- Throws:
IllegalArgumentException- if the value is not valid. See explanation above or if the name does not identify a method in the referenced annotation type.
-
setIntValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setLongValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setShortValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setDoubleValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setFloatValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setByteValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setBooleanValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setCharValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setStringValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array without any null entries- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setClassValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array without any null entries- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setEnumValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array without any null entries- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-
setAnnotationValue
Sets the given value for the given annotation element name.- Parameters:
name- a valid name of a property of the annotation type.value- a non-null value array without any null entries- Throws:
IllegalArgumentException- if the name does not point to a valid member of the referenced annotation type.
-