Interface JavaNode
-
- All Superinterfaces:
GenericNode<JavaNode>
,JjtreeNode<JavaNode>
,Node
,Reportable
,TextAvailableNode
- All Known Subinterfaces:
Annotatable
,ASTAssignableExpr
,ASTAssignableExpr.ASTNamedReferenceExpr
,ASTBodyDeclaration
,ASTExecutableDeclaration
,ASTExpression
,ASTLiteral
,ASTLoopStatement
,ASTMemberValue
,ASTPattern
,ASTPrimaryExpression
,ASTReferenceType
,ASTStatement
,ASTSwitchArrowRHS
,ASTSwitchBranch
,ASTSwitchLike
,ASTTopLevelDeclaration
,ASTType
,ASTTypeDeclaration
,FunctionalExpression
,InvocationNode
,JavadocCommentOwner
,MethodUsage
,ModifierOwner
,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
,ASTClassBody
,ASTClassDeclaration
,ASTClassLiteral
,ASTClassType
,ASTCompactConstructorDeclaration
,ASTCompilationUnit
,ASTConditionalExpression
,ASTConstructorCall
,ASTConstructorDeclaration
,ASTContinueStatement
,ASTDefaultValue
,ASTDoStatement
,ASTEmptyDeclaration
,ASTEmptyStatement
,ASTEnumBody
,ASTEnumConstant
,ASTEnumDeclaration
,ASTExplicitConstructorInvocation
,ASTExpressionStatement
,ASTExtendsList
,ASTFieldAccess
,ASTFieldDeclaration
,ASTFinallyClause
,ASTForeachStatement
,ASTForInit
,ASTFormalParameter
,ASTFormalParameters
,ASTForStatement
,ASTForUpdate
,ASTGuard
,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
,ASTPatternList
,ASTPermitsList
,ASTPrimitiveType
,ASTReceiverParameter
,ASTRecordBody
,ASTRecordComponent
,ASTRecordComponentList
,ASTRecordDeclaration
,ASTRecordPattern
,ASTResource
,ASTResourceList
,ASTReturnStatement
,ASTStatementExpressionList
,ASTStringLiteral
,ASTSuperExpression
,ASTSwitchArrowBranch
,ASTSwitchExpression
,ASTSwitchFallthroughBranch
,ASTSwitchLabel
,ASTSwitchStatement
,ASTSynchronizedStatement
,ASTTemplate
,ASTTemplateExpression
,ASTTemplateFragment
,ASTThisExpression
,ASTThrowsList
,ASTThrowStatement
,ASTTryStatement
,ASTTypeArguments
,ASTTypeBody
,ASTTypeExpression
,ASTTypeParameter
,ASTTypeParameters
,ASTTypePattern
,ASTUnaryExpression
,ASTUnionType
,ASTUnnamedPattern
,ASTVariableAccess
,ASTVariableDeclarator
,ASTVariableId
,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 Modifier and Type Method Description default ASTTypeDeclaration
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.-
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.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
-
-
-
-
Method Detail
-
getEnclosingType
default ASTTypeDeclaration 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 TypeDeclarations.
-
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.
-
-