Class ASTClassOrInterfaceDeclaration

    • Method Detail

      • 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()
      • getDeclarations

        public 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 List<ASTClassOrInterfaceType> getSuperInterfacesTypeNodes()
        Returns the interfaces implemented by this class, or extended by this interface. Returns an empty list if none is specified.
      • getAnnotation

        public ASTAnnotation getAnnotation​(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​(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​(Collection<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