Class AbstractAnyTypeDeclaration

    • Method Detail

      • isNested

        public final boolean isNested()
        Deprecated.
        Description copied from interface: ASTAnyTypeDeclaration
        Returns true if this type declaration is nested inside an interface, class or annotation.
        Specified by:
        isNested in interface ASTAnyTypeDeclaration
      • getRecordComponents

        public ASTRecordComponentList getRecordComponents()
        Deprecated.
        Returns the record component list, or null if this is not a record declaration.
      • enclosingTypeIsA

        public final boolean enclosingTypeIsA​(ASTAnyTypeDeclaration.TypeKind... kinds)
        Deprecated.
        Returns true if the enclosing type of this type declaration is any of the given kinds. If this declaration is a top-level declaration, returns false. This won't consider anonymous classes until #905 is tackled. TODO 7.0.0
        Parameters:
        kinds - Kinds to test
      • getEnclosingTypeDeclaration

        public final ASTAnyTypeDeclaration getEnclosingTypeDeclaration()
        Deprecated.
        Returns the enclosing type of this type, if it is nested. Otherwise returns null. This won't consider anonymous classes until #905 is tackled. TODO 7.0.0
      • getAnnotation

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

        public boolean isAnnotationPresent​(String binaryName)
        Description copied from interface: Annotatable
        Checks whether the annotation is present on this node.
        Specified by:
        isAnnotationPresent in interface Annotatable
        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
      • isAnyAnnotationPresent

        public boolean isAnyAnnotationPresent​(Collection<String> binaryNames)
        Description copied from interface: Annotatable
        Checks whether any annotation is present on this node.
        Specified by:
        isAnyAnnotationPresent in interface Annotatable
        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