Interface AnnotationReferenceProvider

    • 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 AnnotationReference pointing to the type with the give name, or null if no such annotation type could be found.
        Throws:
        java.lang.IllegalArgumentException - if the name is 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 be null.
        Returns:
        a AnnotationReference pointing to the given type, or null if 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 given Class.
        Parameters:
        annotationClass - the Class to point to, must not be null.
        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.
        Throws:
        java.lang.IllegalArgumentException - if the given Class is 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 be null or detached.
        Returns:
        a AnnotationReference constructed based on the given annotation reference, can be null
        Throws:
        java.lang.IllegalArgumentException - if the given annotation reference is null or 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 to
        initializer - a callback for further initialization of the create annotation reference, must not be null.
        Returns:
        a AnnotationReference pointing to the type with the give name, or null if no such annotation type could be found.
        Throws:
        java.lang.IllegalArgumentException - if the name is not a valid java identifier or the initializer is null
      • 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 be null.
        initializer - a callback for further initialization of the create annotation reference, must not be null.
        Returns:
        a AnnotationReference pointing to the given type, or null if the given type is not an annotation type.
        Throws:
        java.lang.IllegalArgumentException - if the given type declaration is null or the initializer is null
      • newAnnotationReference

        AnnotationReference newAnnotationReference​(java.lang.Class<?> annotationClass,
                                                   org.eclipse.xtext.xbase.lib.Procedures.Procedure1<AnnotationReferenceBuildContext> initializer)
        Creates a new annotation reference for the given Class.
        Parameters:
        annotationClass - the Class to point to, must not be null.
        initializer - a callback for further initialization of the create annotation reference, must not be null.
        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.
        Throws:
        java.lang.IllegalArgumentException - if the given Class is null or the initializer is null
      • 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 be null or detached.
        initializer - a callback for further initialization of the create annotation reference, must not be null.
        Returns:
        a AnnotationReference constructed based on the given annotation reference, can be null
        Throws:
        java.lang.IllegalArgumentException - if the given annotation reference is null or detached; or the initializer is null