R
- the return type of this visitor's methods. Use Void
for visitors that do not need to return results.P
- the type of the additional parameter to this visitor's methods. Use Void
for visitors that do not need an additional parameter.TreeVisitor<R,P>
public class TreePathScanner<R,P> extends TreeScanner<R,P>
scan
methods.Constructor | Description |
---|---|
TreePathScanner() |
Constructs a TreePathScanner . |
reduce, scan, visitAnnotatedType, visitAnnotation, visitAnyPattern, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBindingPattern, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitConstantCaseLabel, visitContinue, visitDeconstructionPattern, visitDefaultCaseLabel, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitModule, visitNewArray, visitNewClass, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesized, visitPatternCaseLabel, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitStringTemplate, visitSwitch, visitSwitchExpression, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitUses, visitVariable, visitWhileLoop, visitWildcard, visitYield
public TreePathScanner()
TreePathScanner
.public R scan(TreePath path, P p)
path
- the path identifying the node to be scannedp
- a parameter value passed to visit methodspublic R scan(Tree tree, P p)
scan
in class TreeScanner<R,P>
visit
methods, as part of an ongoing scan initiated by scan(TreePath, P)
. The one exception is that it may also be called to initiate a full scan of a CompilationUnitTree
.tree
- the node to be scannedp
- a parameter value passed to the visit methodpublic TreePath getCurrentPath()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/jdk.compiler/com/sun/source/util/TreePathScanner.html