Interface Annotatable

    • Method Detail

      • getDeclaredAnnotations

        List<ASTAnnotation> getDeclaredAnnotations()
        Get all annotations present on this node.
        Returns:
        all annotations present on this node.
      • getAnnotation

        ASTAnnotation getAnnotation​(String binaryName)
        Returns a specific annotation on this node, or null if absent.
        Parameters:
        binaryName - Binary name of the annotation type. Note: for now, canonical names are tolerated, this may be changed in PMD 7.
      • isAnyAnnotationPresent

        boolean isAnyAnnotationPresent​(Collection<String> binaryNames)
        Checks whether any annotation is present on this node.
        Parameters:
        binaryNames - Collection that contains binary names of annotations. Note: for now, canonical names are tolerated, this may be changed in PMD 7.
        Returns:
        true if any annotation is present on this node, else false
      • isAnnotationPresent

        boolean isAnnotationPresent​(String binaryName)
        Checks whether the annotation is present on this node.
        Parameters:
        binaryName - Binary name of the annotation type. Note: for now, canonical names are tolerated, this may be changed in PMD 7.
        Returns:
        true if the annotation is present on this node, else false