|
Compiler Tree API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.source.util.TreeScanner<R,P>
com.sun.source.util.TreePathScanner<R,P>
public class TreePathScanner<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.
| Constructor Summary | |
|---|---|
TreePathScanner()
|
|
| Method Summary | |
|---|---|
TreePath |
getCurrentPath()
Get the current path for the node, as built up by the currently active set of scan calls. |
R |
scan(Tree tree,
P p)
Scan a single node. |
R |
scan(TreePath path,
P p)
Scan a tree from a position identified by a TreePath. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreePathScanner()
| Method Detail |
|---|
public R scan(TreePath path,
P p)
public R scan(Tree tree,
P p)
scan in class TreeScanner<R,P>public TreePath getCurrentPath()
|
Compiler Tree API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||