Class ASTClassOrInterfaceDeclaration

    • Constructor Detail

      • ASTClassOrInterfaceDeclaration

        @InternalApi
        @Deprecated
        public ASTClassOrInterfaceDeclaration​(int id)
        Deprecated.
      • ASTClassOrInterfaceDeclaration

        @InternalApi
        @Deprecated
        public ASTClassOrInterfaceDeclaration​(JavaParser p,
                                              int id)
        Deprecated.
    • Method Detail

      • isFindBoundary

        public boolean isFindBoundary()
        Specified by:
        isFindBoundary in interface net.sourceforge.pmd.lang.ast.Node
        Overrides:
        isFindBoundary in class net.sourceforge.pmd.lang.ast.AbstractNode
      • jjtAccept

        public java.lang.Object jjtAccept​(JavaParserVisitor visitor,
                                          java.lang.Object data)
        Description copied from interface: JavaNode
        Calls back the visitor's visit method corresponding to the runtime type of this Node.
        Specified by:
        jjtAccept in interface JavaNode
        Overrides:
        jjtAccept in class AbstractJavaNode
        Parameters:
        visitor - Visitor to dispatch
        data - Visit data
      • isLocal

        public boolean isLocal()
        Returns true if the class is declared inside a block other than the body of another class, or the top level.
      • isInterface

        public boolean isInterface()
      • setInterface

        @InternalApi
        @Deprecated
        public void setInterface()
        Deprecated.
      • getDeclarations

        public java.util.List<ASTAnyTypeBodyDeclaration> getDeclarations()
        Description copied from interface: ASTAnyTypeDeclaration
        Retrieves the member declarations (fields, methods, classes, etc.) from the body of this type declaration.
        Returns:
        The member declarations declared in this type declaration
      • getSuperClassTypeNode

        public ASTClassOrInterfaceType getSuperClassTypeNode()
        Returns the superclass type node if this node is a class declaration and explicitly declares an extends clause. Superinterfaces of an interface are not considered.

        Returns null otherwise.

      • getSuperInterfacesTypeNodes

        public java.util.List<ASTClassOrInterfaceType> getSuperInterfacesTypeNodes()
        Returns the interfaces implemented by this class, or extended by this interface. Returns an empty list if none is specified.
      • getDeclaredAnnotations

        public java.util.List<ASTAnnotation> getDeclaredAnnotations()
        Description copied from interface: Annotatable
        Get all annotations present on this node.
        Specified by:
        getDeclaredAnnotations in interface Annotatable
        Returns:
        all annotations present on this node.
      • getAnnotation

        public ASTAnnotation getAnnotation​(java.lang.String annotQualifiedName)
        Description copied from interface: Annotatable
        Get specific annotaion on this node.
        Specified by:
        getAnnotation in interface Annotatable
        Parameters:
        annotQualifiedName - qulified name of the annotation.
        Returns:
        ASTAnnotaion node if the annotation is present on this node, else null
      • isAnnotationPresent

        public boolean isAnnotationPresent​(java.lang.String annotQualifiedName)
        Description copied from interface: Annotatable
        Checks whether the annotation is present on this node.
        Specified by:
        isAnnotationPresent in interface Annotatable
        Parameters:
        annotQualifiedName - qulified name of the annotation.
        Returns:
        true if the annotation is present on this node, else false
      • isAnyAnnotationPresent

        public boolean isAnyAnnotationPresent​(java.util.Collection<java.lang.String> annotQualifiedNames)
        Description copied from interface: Annotatable
        Checks whether any annotation is present on this node.
        Specified by:
        isAnyAnnotationPresent in interface Annotatable
        Parameters:
        annotQualifiedNames - collection that cotains qulified name of annotations.
        Returns:
        true if any annotation is present on this node, else false