Interface ASTType
-
- All Superinterfaces:
Annotatable,GenericNode<JavaNode>,JavaNode,JjtreeNode<JavaNode>,Node,Reportable,TextAvailableNode,TypeNode
- All Known Subinterfaces:
ASTReferenceType
- All Known Implementing Classes:
ASTAmbiguousName,ASTArrayType,ASTClassOrInterfaceType,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
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default intgetArrayDepth()Deprecated.default StringgetTypeImage()Deprecated.This is not meaningful.default booleanisArrayType()Deprecated.default booleanisClassOrInterfaceType()Deprecated.default booleanisPrimitiveType()Deprecated.default booleanisVoid()Returns true if this is the "void" pseudo-type, ie anASTVoidType.-
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, getNthParent, getParent, getPreviousSibling
-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.JavaNode
getEnclosingType, getRoot, getSymbolTable, getTypeSystem, jjtAccept
-
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, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, firstChild, getAstInfo, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfType, getImage, getIndexInParent, getLanguageVersion, getNumChildren, getParentsOfType, getReportLocation, getTextDocument, getUserMap, getXPathAttributesIterator, getXPathNodeName, hasDescendantOfType, 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
getType, getTypeMirror, getTypeMirror
-
-
-
-
Method Detail
-
getTypeImage
@Deprecated default String getTypeImage()
Deprecated.This is not meaningful. UsePrettyPrintingUtilFor now this returns the name of the type with all the segments, without annotations, array dimensions, or type parameters. Experimental because we need to specify it, eg it would be more useful to have a method return a qualified name with help of the symbol table.
-
getArrayDepth
@Deprecated default int getArrayDepth()
Deprecated.Returns the number of array dimensions of this type. This is 0 unless this node isArrayType().
-
isVoid
default boolean isVoid()
Returns true if this is the "void" pseudo-type, ie anASTVoidType.
-
isPrimitiveType
@Deprecated default boolean isPrimitiveType()
Deprecated.
-
isArrayType
@Deprecated default boolean isArrayType()
Deprecated.
-
isClassOrInterfaceType
@Deprecated default boolean isClassOrInterfaceType()
Deprecated.
-
-