Top Description Methods
org.eclipse.xtend.lib.macro.services

public Interface AnnotationReferenceBuildContext

Annotations
@Beta
Imports
org.eclipse.xtend.lib.macro.declaration.AnnotationReference, .EnumerationValueDeclaration, .TypeReference, com.google.common.annotations.Beta

Services provided during an annotation reference initialization.
Author
Anton Kosyakov
Since
2.6

Method Summary

Modifier and TypeMethod and Description
public void
set(String
a valid name of a property of the annotation type.
name
,
Object
an annotation value or null if the annotation value should be removed.
value
)

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
public void
setAnnotationValue(String
a valid name of a property of the annotation type.
name
,
AnnotationReference...
a non-null value array without any null entries
value
)

Sets the given value for the given annotation element name.

public void
setBooleanValue(String
a valid name of a property of the annotation type.
name
,
boolean...
a non-null value array
value
)

Sets the given value for the given annotation element name.

public void
setByteValue(String
a valid name of a property of the annotation type.
name
,
byte...
a non-null value array
value
)

Sets the given value for the given annotation element name.

public void
setCharValue(String
a valid name of a property of the annotation type.
name
,
char...
a non-null value array
value
)

Sets the given value for the given annotation element name.

public void
setClassValue(String
a valid name of a property of the annotation type.
name
,
TypeReference...
a non-null value array without any null entries
value
)

Sets the given value for the given annotation element name.

public void
setDoubleValue(String
a valid name of a property of the annotation type.
name
,
double...
a non-null value array
value
)

Sets the given value for the given annotation element name.

public void
setEnumValue(String
a valid name of a property of the annotation type.
name
,
EnumerationValueDeclaration...
a non-null value array without any null entries
value
)

Sets the given value for the given annotation element name.

public void
setFloatValue(String
a valid name of a property of the annotation type.
name
,
float...
a non-null value array
value
)

Sets the given value for the given annotation element name.

public void
setIntValue(String
a valid name of a property of the annotation type.
name
,
int...
a non-null value array
value
)

Sets the given value for the given annotation element name.

public void
setLongValue(String
a valid name of a property of the annotation type.
name
,
long...
a non-null value array
value
)

Sets the given value for the given annotation element name.

public void
setShortValue(String
a valid name of a property of the annotation type.
name
,
short...
a non-null value array
value
)

Sets the given value for the given annotation element name.

public void
setStringValue(String
a valid name of a property of the annotation type.
name
,
String...
a non-null value array without any null entries
value
)

Sets the given value for the given annotation element name.

Method Detail

setback to summary
public void set(String name, Object value)

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:String

a valid name of a property of the annotation type.

value:Object

an annotation value or null if the annotation value should be removed.

Exceptions
IllegalArgumentException:
if the value is not valid. See explanation above or if the name does not identify a method in the referenced annotation type.
setAnnotationValueback to summary
public void setAnnotationValue(String name, AnnotationReference... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:AnnotationReference[]

a non-null value array without any null entries

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setBooleanValueback to summary
public void setBooleanValue(String name, boolean... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:boolean[]

a non-null value array

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setByteValueback to summary
public void setByteValue(String name, byte... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:byte[]

a non-null value array

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setCharValueback to summary
public void setCharValue(String name, char... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:char[]

a non-null value array

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setClassValueback to summary
public void setClassValue(String name, TypeReference... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:TypeReference[]

a non-null value array without any null entries

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setDoubleValueback to summary
public void setDoubleValue(String name, double... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:double[]

a non-null value array

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setEnumValueback to summary
public void setEnumValue(String name, EnumerationValueDeclaration... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:EnumerationValueDeclaration[]

a non-null value array without any null entries

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setFloatValueback to summary
public void setFloatValue(String name, float... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:float[]

a non-null value array

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setIntValueback to summary
public void setIntValue(String name, int... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:int[]

a non-null value array

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setLongValueback to summary
public void setLongValue(String name, long... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:long[]

a non-null value array

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setShortValueback to summary
public void setShortValue(String name, short... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:short[]

a non-null value array

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.
setStringValueback to summary
public void setStringValue(String name, String... value)

Sets the given value for the given annotation element name.

Parameters
name:String

a valid name of a property of the annotation type.

value:String[]

a non-null value array without any null entries

Exceptions
IllegalArgumentException:
if the name does not point to a valid member of the referenced annotation type.