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

public Interface AnnotationReferenceProvider

Known Direct Subinterfaces
org.eclipse.xtend.lib.macro.TransformationContext, org.eclipse.xtend.lib.macro.ValidationContext
Annotations
@Beta
Imports
org.eclipse.xtend.lib.macro.declaration.AnnotationReference, .Type, org.eclipse.xtext.xbase.lib.Procedures, com.google.common.annotations.Beta

Creates AnnotationReference instances.
Author
Anton Kosyakov
Since
2.6

Method Summary

Modifier and TypeMethod and Description
public AnnotationReference

Returns:

a AnnotationReference pointing to the type with the give name, or null if no such annotation type could be found.
newAnnotationReference
(String
the name of the annotation type to point to, must be a valid java identifier
annotationTypeName
)

Creates a new annotation reference for the given name.

public AnnotationReference

Returns:

a AnnotationReference pointing to the given type, or null if the given type is not an annotation type.
newAnnotationReference
(Type
the annotation type to point to, must not be null.
annotationTypeDelcaration
)

Creates a new annotation reference for the given type declaration.

public AnnotationReference

Returns:

a AnnotationReference pointing to the given type, or null if the given type is not on the class path of the compiled project or an annotation type.
newAnnotationReference
(Class<?>
the Class to point to, must not be null.
annotationClass
)

Creates a new annotation reference for the given Class.

public AnnotationReference

Returns:

a AnnotationReference constructed based on the given annotation reference, can be null
newAnnotationReference
(AnnotationReference
an annotation reference which is used as a base for a new annotation reference, must not be null or detached.
annotationReference
)

Create a new annotation reference base on the given annotation reference.

public AnnotationReference

Returns:

a AnnotationReference pointing to the type with the give name, or null if no such annotation type could be found.
newAnnotationReference
(String
the name of the annotation type to point to
annotationTypeName
,
Procedures.Procedure1<AnnotationReferenceBuildContext>
a callback for further initialization of the create annotation reference, must not be null.
initializer
)

Creates a new annotation reference for the given name.

public AnnotationReference

Returns:

a AnnotationReference pointing to the given type, or null if the given type is not an annotation type.
newAnnotationReference
(Type
the annotation type to point to, must not be null.
annotationTypeDelcaration
,
Procedures.Procedure1<AnnotationReferenceBuildContext>
a callback for further initialization of the create annotation reference, must not be null.
initializer
)

Creates a new annotation reference for the given type declaration.

public AnnotationReference

Returns:

a AnnotationReference pointing to the given type, or null if the given type is not on the class path of the compiled project or an annotation type.
newAnnotationReference
(Class<?>
the Class to point to, must not be null.
annotationClass
,
Procedures.Procedure1<AnnotationReferenceBuildContext>
a callback for further initialization of the create annotation reference, must not be null.
initializer
)

Creates a new annotation reference for the given Class.

public AnnotationReference

Returns:

a AnnotationReference constructed based on the given annotation reference, can be null
newAnnotationReference
(AnnotationReference
an annotation reference which is used as a base for a new annotation reference, must not be null or detached.
annotationReference
,
Procedures.Procedure1<AnnotationReferenceBuildContext>
a callback for further initialization of the create annotation reference, must not be null.
initializer
)

Create a new annotation reference base on the given annotation reference.

Method Detail

newAnnotationReferenceback to summary
public AnnotationReference newAnnotationReference(String annotationTypeName)

Creates a new annotation reference for the given name.

Parameters
annotationTypeName:String

the name of the annotation type to point to, must be a valid java identifier

Returns:AnnotationReference

a AnnotationReference pointing to the type with the give name, or null if no such annotation type could be found.

Exceptions
IllegalArgumentException:
if the name is not a valid java identifier
newAnnotationReferenceback to summary
public AnnotationReference newAnnotationReference(Type annotationTypeDelcaration)

Creates a new annotation reference for the given type declaration.

Parameters
annotationTypeDelcaration:Type

the annotation type to point to, must not be null.

Returns:AnnotationReference

a AnnotationReference pointing to the given type, or null if the given type is not an annotation type.

Exceptions
IllegalArgumentException:
if the given type declaration is null
newAnnotationReferenceback to summary
public AnnotationReference newAnnotationReference(Class<?> annotationClass)

Creates a new annotation reference for the given Class.

Parameters
annotationClass:Class<?>

the Class to point to, must not be null.

Returns:AnnotationReference

a AnnotationReference pointing to the given type, or null if the given type is not on the class path of the compiled project or an annotation type.

Exceptions
IllegalArgumentException:
if the given Class is null
newAnnotationReferenceback to summary
public AnnotationReference newAnnotationReference(AnnotationReference annotationReference)

Create a new annotation reference base on the given annotation reference.

Parameters
annotationReference:AnnotationReference

an annotation reference which is used as a base for a new annotation reference, must not be null or detached.

Returns:AnnotationReference

a AnnotationReference constructed based on the given annotation reference, can be null

Exceptions
IllegalArgumentException:
if the given annotation reference is null or detached
newAnnotationReferenceback to summary
public AnnotationReference newAnnotationReference(String annotationTypeName, Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)

Creates a new annotation reference for the given name.

Parameters
annotationTypeName:String

the name of the annotation type to point to

initializer:Procedures.Procedure1<AnnotationReferenceBuildContext>

a callback for further initialization of the create annotation reference, must not be null.

Returns:AnnotationReference

a AnnotationReference pointing to the type with the give name, or null if no such annotation type could be found.

Exceptions
IllegalArgumentException:
if the name is not a valid java identifier or the initializer is null
newAnnotationReferenceback to summary
public AnnotationReference newAnnotationReference(Type annotationTypeDelcaration, Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)

Creates a new annotation reference for the given type declaration.

Parameters
annotationTypeDelcaration:Type

the annotation type to point to, must not be null.

initializer:Procedures.Procedure1<AnnotationReferenceBuildContext>

a callback for further initialization of the create annotation reference, must not be null.

Returns:AnnotationReference

a AnnotationReference pointing to the given type, or null if the given type is not an annotation type.

Exceptions
IllegalArgumentException:
if the given type declaration is null or the initializer is null
newAnnotationReferenceback to summary
public AnnotationReference newAnnotationReference(Class<?> annotationClass, Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)

Creates a new annotation reference for the given Class.

Parameters
annotationClass:Class<?>

the Class to point to, must not be null.

initializer:Procedures.Procedure1<AnnotationReferenceBuildContext>

a callback for further initialization of the create annotation reference, must not be null.

Returns:AnnotationReference

a AnnotationReference pointing to the given type, or null if the given type is not on the class path of the compiled project or an annotation type.

Exceptions
IllegalArgumentException:
if the given Class is null or the initializer is null
newAnnotationReferenceback to summary
public AnnotationReference newAnnotationReference(AnnotationReference annotationReference, Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)

Create a new annotation reference base on the given annotation reference.

Parameters
annotationReference:AnnotationReference

an annotation reference which is used as a base for a new annotation reference, must not be null or detached.

initializer:Procedures.Procedure1<AnnotationReferenceBuildContext>

a callback for further initialization of the create annotation reference, must not be null.

Returns:AnnotationReference

a AnnotationReference constructed based on the given annotation reference, can be null

Exceptions
IllegalArgumentException:
if the given annotation reference is null or detached; or the initializer is null