Interface JavaNode
-
- All Superinterfaces:
GenericNode<JavaNode>
,JjtreeNode<JavaNode>
,Node
,Reportable
,TextAvailableNode
- All Known Subinterfaces:
AccessNode
,Annotatable
,ASTAnyTypeDeclaration
,ASTAssignableExpr
,ASTAssignableExpr.ASTNamedReferenceExpr
,ASTBodyDeclaration
,ASTExpression
,ASTLiteral
,ASTLoopStatement
,ASTMemberValue
,ASTMethodOrConstructorDeclaration
,ASTPattern
,ASTPrimaryExpression
,ASTReferenceType
,ASTStatement
,ASTSwitchArrowRHS
,ASTSwitchBranch
,ASTSwitchLike
,ASTTopLevelDeclaration
,ASTType
,FinalizableNode
,FunctionalExpression
,InvocationNode
,JavadocCommentOwner
,MethodUsage
,QualifiableExpression
,SymbolDeclaratorNode
,TypeNode
,TypeParamOwnerNode
- All Known Implementing Classes:
AbstractPackageNameModuleDirective
,ASTAmbiguousName
,ASTAnnotation
,ASTAnnotationMemberList
,ASTAnnotationTypeBody
,ASTAnnotationTypeDeclaration
,ASTAnonymousClassDeclaration
,ASTArgumentList
,ASTArrayAccess
,ASTArrayAllocation
,ASTArrayDimensions
,ASTArrayDimExpr
,ASTArrayInitializer
,ASTArrayType
,ASTArrayTypeDim
,ASTAssertStatement
,ASTAssignmentExpression
,ASTBlock
,ASTBooleanLiteral
,ASTBreakStatement
,ASTCastExpression
,ASTCatchClause
,ASTCatchParameter
,ASTCharLiteral
,ASTClassLiteral
,ASTClassOrInterfaceBody
,ASTClassOrInterfaceDeclaration
,ASTClassOrInterfaceType
,ASTCompactConstructorDeclaration
,ASTCompilationUnit
,ASTComponentPatternList
,ASTConditionalExpression
,ASTConstructorCall
,ASTConstructorDeclaration
,ASTContinueStatement
,ASTDefaultValue
,ASTDoStatement
,ASTEmptyDeclaration
,ASTEmptyStatement
,ASTEnumBody
,ASTEnumConstant
,ASTEnumDeclaration
,ASTExplicitConstructorInvocation
,ASTExpressionStatement
,ASTExtendsList
,ASTFieldAccess
,ASTFieldDeclaration
,ASTFinallyClause
,ASTForeachStatement
,ASTForInit
,ASTFormalParameter
,ASTFormalParameters
,ASTForStatement
,ASTForUpdate
,ASTIfStatement
,ASTImplementsList
,ASTImportDeclaration
,ASTInfixExpression
,ASTInitializer
,ASTIntersectionType
,ASTLabeledStatement
,ASTLambdaExpression
,ASTLambdaParameter
,ASTLambdaParameterList
,ASTList
,ASTLocalClassStatement
,ASTLocalVariableDeclaration
,ASTMemberValueArrayInitializer
,ASTMemberValuePair
,ASTMethodCall
,ASTMethodDeclaration
,ASTMethodReference
,ASTModifierList
,ASTModuleDeclaration
,ASTModuleDirective
,ASTModuleExportsDirective
,ASTModuleName
,ASTModuleOpensDirective
,ASTModuleProvidesDirective
,ASTModuleRequiresDirective
,ASTModuleUsesDirective
,ASTNullLiteral
,ASTNumericLiteral
,ASTPackageDeclaration
,ASTPatternExpression
,ASTPermitsList
,ASTPrimitiveType
,ASTReceiverParameter
,ASTRecordBody
,ASTRecordComponent
,ASTRecordComponentList
,ASTRecordDeclaration
,ASTRecordPattern
,ASTResource
,ASTResourceList
,ASTReturnStatement
,ASTStatementExpressionList
,ASTStringLiteral
,ASTSuperExpression
,ASTSwitchArrowBranch
,ASTSwitchExpression
,ASTSwitchFallthroughBranch
,ASTSwitchGuard
,ASTSwitchLabel
,ASTSwitchStatement
,ASTSynchronizedStatement
,ASTThisExpression
,ASTThrowsList
,ASTThrowStatement
,ASTTryStatement
,ASTTypeArguments
,ASTTypeBody
,ASTTypeExpression
,ASTTypeParameter
,ASTTypeParameters
,ASTTypePattern
,ASTUnaryExpression
,ASTUnionType
,ASTVariableAccess
,ASTVariableDeclarator
,ASTVariableDeclaratorId
,ASTVoidType
,ASTWhileStatement
,ASTWildcardType
,ASTYieldStatement
public interface JavaNode extends JjtreeNode<JavaNode>
Root interface for all Nodes of the Java AST.
-
-
Field Summary
-
Fields inherited from interface net.sourceforge.pmd.lang.ast.Node
COORDS_COMPARATOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default ASTAnyTypeDeclaration
getEnclosingType()
Returns the node representing the type declaration this node is found in.@NonNull ASTCompilationUnit
getRoot()
@NonNull JSymbolTable
getSymbolTable()
Returns the symbol table for the program point represented by this node.TypeSystem
getTypeSystem()
Returns the type system with which this node was created.default Object
jjtAccept(JavaParserVisitor visitor, Object data)
Deprecated.-
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.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
-
-
-
-
Method Detail
-
jjtAccept
@Deprecated default Object jjtAccept(JavaParserVisitor visitor, Object data)
Deprecated.Calls back the visitor's visit method corresponding to the runtime type of this Node.- Parameters:
visitor
- Visitor to dispatchdata
- Visit data
-
getEnclosingType
default ASTAnyTypeDeclaration getEnclosingType()
Returns the node representing the type declaration this node is found in. The type of that node is the type of thethis
expression.This returns null for nodes that aren't enclosed in a type declaration. This includes PackageDeclaration, This includes ImportDeclaration, ModuleDeclaration, CompilationUnit, and top-level AnyTypeDeclarations.
-
getRoot
@NonNull ASTCompilationUnit getRoot()
-
getSymbolTable
@NonNull JSymbolTable getSymbolTable()
Returns the symbol table for the program point represented by this node.
-
getTypeSystem
TypeSystem getTypeSystem()
Returns the type system with which this node was created. This is the object responsible for representing types in the compilation unit.
-
-