Module jdk.compiler

Class TreePathScanner<R,P>

java.lang.Object
com.sun.source.util.TreeScanner<R,P>
com.sun.source.util.TreePathScanner<R,P>
Type Parameters:
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.
All Implemented Interfaces:
TreeVisitor<R,P>

public class TreePathScanner<R,P> extends TreeScanner<R,P>
A TreeVisitor that visits all the child tree nodes, and provides support for maintaining a path for the parent nodes. To visit nodes of a particular type, just override the corresponding visitorXYZ method. Inside your method, call super.visitXYZ to visit descendant nodes.
API Note:
In order to initialize the "current path", the scan must be started by calling one of the scan methods.
Since:
1.6