Interface JavaNode
-
- All Superinterfaces:
Node
,ScopedNode
- All Known Subinterfaces:
Annotatable
,ASTAnyTypeBodyDeclaration
,ASTAnyTypeDeclaration
,ASTMethodOrConstructorDeclaration
,ASTPattern
,MethodLikeNode
,TypeNode
- All Known Implementing Classes:
AbstractAnyTypeDeclaration
,AbstractJavaAccessNode
,AbstractJavaAccessTypeNode
,AbstractJavaNode
,AbstractJavaTypeNode
,AbstractMethodLikeNode
,AbstractMethodOrConstructorDeclaration
,ASTAdditiveExpression
,ASTAllocationExpression
,ASTAndExpression
,ASTAnnotation
,ASTAnnotationMethodDeclaration
,ASTAnnotationTypeBody
,ASTAnnotationTypeDeclaration
,ASTAnnotationTypeMemberDeclaration
,ASTArgumentList
,ASTArguments
,ASTArrayDimsAndInits
,ASTArrayInitializer
,ASTAssertStatement
,ASTAssignmentOperator
,ASTBlock
,ASTBlockStatement
,ASTBooleanLiteral
,ASTBreakStatement
,ASTCastExpression
,ASTCatchStatement
,ASTClassOrInterfaceBody
,ASTClassOrInterfaceBodyDeclaration
,ASTClassOrInterfaceDeclaration
,ASTClassOrInterfaceType
,ASTCompilationUnit
,ASTConditionalAndExpression
,ASTConditionalExpression
,ASTConditionalOrExpression
,ASTConstructorDeclaration
,ASTContinueStatement
,ASTDefaultValue
,ASTDoStatement
,ASTEmptyStatement
,ASTEnumBody
,ASTEnumConstant
,ASTEnumDeclaration
,ASTEqualityExpression
,ASTExclusiveOrExpression
,ASTExplicitConstructorInvocation
,ASTExpression
,ASTExtendsList
,ASTFieldDeclaration
,ASTFinallyStatement
,ASTForInit
,ASTFormalParameter
,ASTFormalParameters
,ASTForStatement
,ASTForUpdate
,ASTIfStatement
,ASTImplementsList
,ASTImportDeclaration
,ASTInclusiveOrExpression
,ASTInitializer
,ASTInstanceOfExpression
,ASTLabeledStatement
,ASTLambdaExpression
,ASTLiteral
,ASTLocalVariableDeclaration
,ASTMarkerAnnotation
,ASTMemberSelector
,ASTMemberValue
,ASTMemberValueArrayInitializer
,ASTMemberValuePair
,ASTMemberValuePairs
,ASTMethodDeclaration
,ASTMethodDeclarator
,ASTMethodReference
,ASTModuleDeclaration
,ASTModuleDirective
,ASTModuleName
,ASTMultiplicativeExpression
,ASTName
,ASTNameList
,ASTNormalAnnotation
,ASTNullLiteral
,ASTPackageDeclaration
,ASTPermitsList
,ASTPostfixExpression
,ASTPreDecrementExpression
,ASTPreIncrementExpression
,ASTPrimaryExpression
,ASTPrimaryPrefix
,ASTPrimarySuffix
,ASTPrimitiveType
,ASTRecordBody
,ASTRecordComponent
,ASTRecordComponentList
,ASTRecordConstructorDeclaration
,ASTRecordDeclaration
,ASTReferenceType
,ASTRelationalExpression
,ASTResource
,ASTResources
,ASTResourceSpecification
,ASTResultType
,ASTReturnStatement
,ASTRSIGNEDSHIFT
,ASTRUNSIGNEDSHIFT
,ASTShiftExpression
,ASTSingleMemberAnnotation
,ASTStatement
,ASTStatementExpression
,ASTStatementExpressionList
,ASTSwitchExpression
,ASTSwitchLabel
,ASTSwitchLabeledBlock
,ASTSwitchLabeledExpression
,ASTSwitchLabeledThrowStatement
,ASTSwitchStatement
,ASTSynchronizedStatement
,ASTThrowStatement
,ASTTryStatement
,ASTType
,ASTTypeArgument
,ASTTypeArguments
,ASTTypeBound
,ASTTypeDeclaration
,ASTTypeParameter
,ASTTypeParameters
,ASTTypeTestPattern
,ASTUnaryExpression
,ASTUnaryExpressionNotPlusMinus
,ASTVariableDeclarator
,ASTVariableDeclaratorId
,ASTVariableInitializer
,ASTWhileStatement
,ASTWildcardBounds
,ASTYieldStatement
,DummyJavaNode
public interface JavaNode extends ScopedNode
Root interface for all Nodes of the Java AST.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Iterable<? extends JavaNode>
children()
Object
childrenAccept(JavaParserVisitor visitor, Object data)
Deprecated.This method is not useful, the logic for combining children values should be present on the visitor, not the nodeJavaNode
getChild(int index)
JavaNode
getParent()
ASTCompilationUnit
getRoot()
Object
jjtAccept(JavaParserVisitor visitor, Object data)
Calls back the visitor's visit method corresponding to the runtime type of this Node.void
setScope(Scope scope)
Deprecated.-
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
-
jjtAccept
Object jjtAccept(JavaParserVisitor visitor, Object data)
Calls back the visitor's visit method corresponding to the runtime type of this Node.- Parameters:
visitor
- Visitor to dispatchdata
- Visit data
-
childrenAccept
@Deprecated Object childrenAccept(JavaParserVisitor visitor, Object data)
Deprecated.This method is not useful, the logic for combining children values should be present on the visitor, not the nodeDispatches the given visitor to the children of this node. This is the default implementation ofJavaParserVisitor.visit(JavaNode, Object)
, to which all other default implementations for visit methods delegate. Unless visit methods are overridden without callingsuper.visit
, the visitor performs a depth-first tree walk.The return value of the visit methods called on children are ignored.
- Parameters:
visitor
- Visitor to dispatchdata
- Visit data
-
getRoot
ASTCompilationUnit getRoot()
-
setScope
@InternalApi @Deprecated void setScope(Scope scope)
Deprecated.
-
-