Interface TypeNode
-
- All Superinterfaces:
JavaNode
,Node
,ScopedNode
- All Known Subinterfaces:
ASTAnyTypeDeclaration
- All Known Implementing Classes:
AbstractAnyTypeDeclaration
,AbstractJavaAccessTypeNode
,AbstractJavaTypeNode
,ASTAdditiveExpression
,ASTAllocationExpression
,ASTAndExpression
,ASTAnnotation
,ASTAnnotationTypeDeclaration
,ASTBooleanLiteral
,ASTCastExpression
,ASTClassOrInterfaceDeclaration
,ASTClassOrInterfaceType
,ASTCompilationUnit
,ASTConditionalAndExpression
,ASTConditionalExpression
,ASTConditionalOrExpression
,ASTEnumDeclaration
,ASTEqualityExpression
,ASTExclusiveOrExpression
,ASTExpression
,ASTFieldDeclaration
,ASTFormalParameter
,ASTImportDeclaration
,ASTInclusiveOrExpression
,ASTInstanceOfExpression
,ASTLiteral
,ASTMarkerAnnotation
,ASTMultiplicativeExpression
,ASTName
,ASTNormalAnnotation
,ASTNullLiteral
,ASTPostfixExpression
,ASTPreDecrementExpression
,ASTPreIncrementExpression
,ASTPrimaryExpression
,ASTPrimaryPrefix
,ASTPrimarySuffix
,ASTPrimitiveType
,ASTRecordDeclaration
,ASTReferenceType
,ASTRelationalExpression
,ASTResource
,ASTShiftExpression
,ASTSingleMemberAnnotation
,ASTStatementExpression
,ASTSwitchExpression
,ASTType
,ASTTypeArgument
,ASTTypeBound
,ASTTypeDeclaration
,ASTTypeParameter
,ASTUnaryExpression
,ASTUnaryExpressionNotPlusMinus
,ASTVariableDeclarator
,ASTVariableDeclaratorId
,ASTWildcardBounds
,ASTYieldStatement
public interface TypeNode extends JavaNode
This interface allows a Java Class to be associated with a node.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Class<?>
getType()
Get the Java Class associated with this node.JavaTypeDefinition
getTypeDefinition()
Get the TypeDefinition associated with this node.void
setType(Class<?> type)
Deprecated.void
setTypeDefinition(JavaTypeDefinition type)
Deprecated.-
Methods inherited from interface net.sourceforge.pmd.lang.java.ast.JavaNode
children, childrenAccept, getChild, getParent, getRoot, jjtAccept, setScope
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.Node
findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getIndexInParent, getNthParent, getNumChildren, getParentsOfType, getUserData, getUserMap, getXPathAttributesIterator, getXPathNodeName, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData
-
Methods inherited from interface net.sourceforge.pmd.lang.symboltable.ScopedNode
getScope
-
-
-
-
Method Detail
-
getType
Class<?> getType()
Get the Java Class associated with this node.- Returns:
- The Java Class, may return
null
.
-
getTypeDefinition
JavaTypeDefinition getTypeDefinition()
Get the TypeDefinition associated with this node. The Class object contained in the TypeDefinition will always be equal to that which is returned bygetType()
.- Returns:
- The TypeDefinition, may return
null
-
setTypeDefinition
@Deprecated @InternalApi void setTypeDefinition(JavaTypeDefinition type)
Deprecated.Set the TypeDefinition associated with this node.- Parameters:
type
- A TypeDefinition object
-
setType
@Deprecated @InternalApi void setType(Class<?> type)
Deprecated.Set the Java Class associated with this node.- Parameters:
type
- A Java Class
-
-