Interface AnnotationReferenceProvider
-
- All Known Subinterfaces:
TransformationContext,ValidationContext
@Beta public interface AnnotationReferenceProviderCreatesAnnotationReferenceinstances.- Since:
- 2.6
- Noimplement:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AnnotationReferencenewAnnotationReference(java.lang.Class<?> annotationClass)Creates a new annotation reference for the givenClass.AnnotationReferencenewAnnotationReference(java.lang.Class<?> annotationClass, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)Creates a new annotation reference for the givenClass.AnnotationReferencenewAnnotationReference(java.lang.String annotationTypeName)Creates a new annotation reference for the given name.AnnotationReferencenewAnnotationReference(java.lang.String annotationTypeName, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)Creates a new annotation reference for the given name.AnnotationReferencenewAnnotationReference(AnnotationReference annotationReference)Create a new annotation reference base on the given annotation reference.AnnotationReferencenewAnnotationReference(AnnotationReference annotationReference, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)Create a new annotation reference base on the given annotation reference.AnnotationReferencenewAnnotationReference(Type annotationTypeDelcaration)Creates a new annotation reference for the given type declaration.AnnotationReferencenewAnnotationReference(Type annotationTypeDelcaration, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)Creates a new annotation reference for the given type declaration.
-
-
-
Method Detail
-
newAnnotationReference
AnnotationReference newAnnotationReference(java.lang.String annotationTypeName)
Creates a new annotation reference for the given name.- Parameters:
annotationTypeName- the name of the annotation type to point to, must be a valid java identifier- Returns:
- a
AnnotationReferencepointing to the type with the give name, ornullif no such annotation type could be found. - Throws:
java.lang.IllegalArgumentException- if thenameis not a valid java identifier
-
newAnnotationReference
AnnotationReference newAnnotationReference(Type annotationTypeDelcaration)
Creates a new annotation reference for the given type declaration.- Parameters:
annotationTypeDelcaration- the annotation type to point to, must not benull.- Returns:
- a
AnnotationReferencepointing to the given type, ornullif the given type is not an annotation type. - Throws:
java.lang.IllegalArgumentException- if the given type declaration is null
-
newAnnotationReference
AnnotationReference newAnnotationReference(java.lang.Class<?> annotationClass)
Creates a new annotation reference for the givenClass.- Parameters:
annotationClass- theClassto point to, must not benull.- Returns:
- a
AnnotationReferencepointing to the given type, ornullif the given type is not on the class path of the compiled project or an annotation type. - Throws:
java.lang.IllegalArgumentException- if the givenClassis null
-
newAnnotationReference
AnnotationReference newAnnotationReference(AnnotationReference annotationReference)
Create a new annotation reference base on the given annotation reference.- Parameters:
annotationReference- an annotation reference which is used as a base for a new annotation reference, must not benullor detached.- Returns:
- a
AnnotationReferenceconstructed based on the given annotation reference, can benull - Throws:
java.lang.IllegalArgumentException- if the given annotation reference isnullor detached
-
newAnnotationReference
AnnotationReference newAnnotationReference(java.lang.String annotationTypeName, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)
Creates a new annotation reference for the given name.- Parameters:
annotationTypeName- the name of the annotation type to point toinitializer- a callback for further initialization of the create annotation reference, must not benull.- Returns:
- a
AnnotationReferencepointing to the type with the give name, ornullif no such annotation type could be found. - Throws:
java.lang.IllegalArgumentException- if thenameis not a valid java identifier or theinitializerisnull
-
newAnnotationReference
AnnotationReference newAnnotationReference(Type annotationTypeDelcaration, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)
Creates a new annotation reference for the given type declaration.- Parameters:
annotationTypeDelcaration- the annotation type to point to, must not benull.initializer- a callback for further initialization of the create annotation reference, must not benull.- Returns:
- a
AnnotationReferencepointing to the given type, ornullif the given type is not an annotation type. - Throws:
java.lang.IllegalArgumentException- if the given type declaration isnullor theinitializerisnull
-
newAnnotationReference
AnnotationReference newAnnotationReference(java.lang.Class<?> annotationClass, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)
Creates a new annotation reference for the givenClass.- Parameters:
annotationClass- theClassto point to, must not benull.initializer- a callback for further initialization of the create annotation reference, must not benull.- Returns:
- a
AnnotationReferencepointing to the given type, ornullif the given type is not on the class path of the compiled project or an annotation type. - Throws:
java.lang.IllegalArgumentException- if the givenClassisnullor theinitializerisnull
-
newAnnotationReference
AnnotationReference newAnnotationReference(AnnotationReference annotationReference, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)
Create a new annotation reference base on the given annotation reference.- Parameters:
annotationReference- an annotation reference which is used as a base for a new annotation reference, must not benullor detached.initializer- a callback for further initialization of the create annotation reference, must not benull.- Returns:
- a
AnnotationReferenceconstructed based on the given annotation reference, can benull - Throws:
java.lang.IllegalArgumentException- if the given annotation reference isnullor detached; or theinitializerisnull
-
-