Interface ASTType

All Superinterfaces:
Annotatable, net.sourceforge.pmd.lang.ast.impl.GenericNode<JavaNode>, JavaNode, net.sourceforge.pmd.lang.ast.impl.javacc.JjtreeNode<JavaNode>, net.sourceforge.pmd.lang.ast.Node, net.sourceforge.pmd.reporting.Reportable, net.sourceforge.pmd.lang.ast.TextAvailableNode, TypeNode
All Known Subinterfaces:
ASTReferenceType
All Known Implementing Classes:
ASTAmbiguousName, ASTArrayType, ASTClassType, ASTIntersectionType, ASTPrimitiveType, ASTUnionType, ASTVoidType, ASTWildcardType

public interface ASTType extends TypeNode, Annotatable
Represents a type reference.

Corresponds to the JLS's Type and UnannType at the same time. In some contexts this can also be an intersection type, though the JLS has no production for that.


 Type ::= ReferenceType
        | PrimitiveType
        | VoidType

 
  • Field Summary

    Fields inherited from interface net.sourceforge.pmd.lang.ast.Node

    COORDS_COMPARATOR
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if this is the "void" pseudo-type, ie an ASTVoidType.

    Methods inherited from interface net.sourceforge.pmd.lang.java.ast.Annotatable

    getAnnotation, getDeclaredAnnotations, isAnnotationPresent, isAnnotationPresent, isAnyAnnotationPresent

    Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.GenericNode

    ancestors, ancestorsOrSelf, asStream, children, descendants, descendantsOrSelf, getChild, getFirstChild, getLastChild, getNextSibling, getParent, getPreviousSibling

    Methods inherited from interface net.sourceforge.pmd.lang.java.ast.JavaNode

    getEnclosingType, getRoot, getSymbolTable, getTypeSystem

    Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.javacc.JjtreeNode

    getFirstToken, getLastToken, tokens

    Methods inherited from interface net.sourceforge.pmd.lang.ast.Node

    acceptVisitor, ancestors, children, compareLocation, descendants, firstChild, getAstInfo, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getIndexInParent, getLanguageVersion, getNumChildren, getReportLocation, getTextDocument, getUserMap, getXPathAttributesIterator, getXPathNodeName, hasImageEqualTo, isFindBoundary

    Methods inherited from interface net.sourceforge.pmd.lang.ast.TextAvailableNode

    getOriginalText, getText, getTextRegion

    Methods inherited from interface net.sourceforge.pmd.lang.java.ast.TypeNode

    getTypeMirror, getTypeMirror
  • Method Details

    • isVoid

      @NoAttribute default boolean isVoid()
      Returns true if this is the "void" pseudo-type, ie an ASTVoidType.