Class DocTreePathScanner<R,P>
- java.lang.Object
-
- com.sun.source.util.DocTreeScanner<R,P>
-
- com.sun.source.util.DocTreePathScanner<R,P>
- All Implemented Interfaces:
DocTreeVisitor<R,P>
public class DocTreePathScanner<R,P> extends DocTreeScanner<R,P>
A DocTreeVisitor 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.
- Since:
- 1.8
Constructors
Constructor | Description |
---|---|
DocTreePathScanner() |
Methods
Modifier and Type | Method | Description |
---|---|---|
DocTreePath | getCurrentPath() | Returns the current path for the node, as built up by the currently active set of scan calls. |
R | scan(DocTree tree,
P p) | Scans a single node. |
R | scan(DocTreePath path,
P p) | Scans a tree from a position identified by a tree path. |
Methods declared in class com.sun.source.util.DocTreeScanner
reduce, scan, visitAttribute, visitAuthor, visitComment, visitDeprecated, visitDocComment, visitDocRoot, visitDocType, visitEndElement, visitEntity, visitErroneous, visitHidden, visitIdentifier, visitIndex, visitInheritDoc, visitLink, visitLiteral, visitOther, visitParam, visitProvides, visitReference, visitReturn, visitSee, visitSerial, visitSerialData, visitSerialField, visitSince, visitStartElement, visitSummary, visitText, visitThrows, visitUnknownBlockTag, visitUnknownInlineTag, visitUses, visitValue, visitVersion
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructors
DocTreePathScanner
public DocTreePathScanner()
Methods
scan
public R scan(DocTreePath path, P p)
Scans a tree from a position identified by a tree path.
- Parameters:
-
path
- the path -
p
- a value to be passed to visitor methods - Returns:
- the result returned from the main visitor method
scan
public R scan(DocTree tree, P p)
Scans a single node. The current path is updated for the duration of the scan.
- Overrides:
-
scan
in classDocTreeScanner<R,P>
- Parameters:
-
tree
- the tree to be scanned -
p
- a value to be passed to visitor methods - Returns:
- the result returned from the main visitor method
getCurrentPath
public DocTreePath getCurrentPath()
Returns the current path for the node, as built up by the currently active set of scan calls.
- Returns:
- the current path
© 1993, 2020, 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/11/docs/api/jdk.compiler/com/sun/source/util/DocTreePathScanner.html