Class AnnotationProcessorUtil


  • public class AnnotationProcessorUtil
    extends java.lang.Object
    Provides some helper methods for Xtend's Active Annotations API.
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.xtend.lib.macro.declaration.AnnotationReference findMetaAnnotation​(org.eclipse.xtend.lib.macro.declaration.AnnotationTarget annotationTarget, org.eclipse.xtend.lib.macro.declaration.Type annotationType)  
      org.eclipse.xtend.lib.macro.declaration.ClassDeclaration getDeclaringClass​(org.eclipse.xtend.lib.macro.declaration.Declaration declaration)
      Returns the ClassDeclaration which contains the given Declaration.
      org.eclipse.xtend.lib.macro.declaration.MethodDeclaration getDeclaringMethod​(org.eclipse.xtend.lib.macro.declaration.Declaration declaration)
      Returns the MethodDeclaration which contains the given Declaration.
      org.eclipse.xtend.lib.macro.declaration.TypeReference getType​(org.eclipse.xtend.lib.macro.declaration.Declaration declaration)
      Returns the type of the given Declaration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AnnotationProcessorUtil

        public AnnotationProcessorUtil()
    • Method Detail

      • getDeclaringClass

        public org.eclipse.xtend.lib.macro.declaration.ClassDeclaration getDeclaringClass​(org.eclipse.xtend.lib.macro.declaration.Declaration declaration)
        Returns the ClassDeclaration which contains the given Declaration. If the given Declaration is a ClassDeclaration, it is returned.
        Parameters:
        declaration - the declaration which's containing ClassDeclaration should be determined
        Returns:
        the class declaration
        Since:
        2.0.0
      • getDeclaringMethod

        public org.eclipse.xtend.lib.macro.declaration.MethodDeclaration getDeclaringMethod​(org.eclipse.xtend.lib.macro.declaration.Declaration declaration)
        Returns the MethodDeclaration which contains the given Declaration. If the given Declaration is a MethodDeclaration, it is returned.
        Parameters:
        declaration - the declaration which's containing MethodDeclaration should be determined
        Returns:
        the method declaration
        Since:
        2.0.0
      • getType

        public org.eclipse.xtend.lib.macro.declaration.TypeReference getType​(org.eclipse.xtend.lib.macro.declaration.Declaration declaration)
        Returns the type of the given Declaration.
        Parameters:
        declaration - the declaration which's type should be determined
        Returns:
        the declaration's type
        Since:
        2.0.0
      • findMetaAnnotation

        public org.eclipse.xtend.lib.macro.declaration.AnnotationReference findMetaAnnotation​(org.eclipse.xtend.lib.macro.declaration.AnnotationTarget annotationTarget,
                                                                                              org.eclipse.xtend.lib.macro.declaration.Type annotationType)