Interface IAnnotatable

    • Method Detail

      • getAnnotation

        IAnnotation getAnnotation​(String name)
        Returns the annotation with the given name declared on this element. This is a handle-only method. The annotation may or may not exist.
        Parameters:
        name - the given simple name
        Returns:
        the annotation with the given name declared on this element
      • getAnnotations

        IAnnotation[] getAnnotations()
                              throws JavaModelException
        Returns the annotations for this element. Returns an empty array if this element has no annotations.
        Returns:
        the annotations of this element, in the order declared in the source, or an empty array if none
        Throws:
        JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource.
        Since:
        3.4