java.lang.Object
com.sun.source.util.DocTreeScanner<R,P>
com.sun.source.util.DocTreePathScanner<R,P>
- Type Parameters:
R
- the return type of this visitor's methods. UseVoid
for visitors that do not need to return results.P
- the type of the additional parameter to this visitor's methods. UseVoid
for visitors that do not need an additional parameter.
- All Implemented Interfaces:
DocTreeVisitor<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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the current path for the node, as built up by the currently active set of scan calls.Scans a single node.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, visitSnippet, visitSpec, visitStartElement, visitSummary, visitSystemProperty, visitText, visitThrows, visitUnknownBlockTag, visitUnknownInlineTag, visitUses, visitValue, visitVersion
-
Constructor Details
-
DocTreePathScanner
public DocTreePathScanner()Constructs aDocTreePathScanner
.
-
-
Method Details
-
scan
Scans a tree from a position identified by a tree path.- Parameters:
path
- the pathp
- a value to be passed to visitor methods- Returns:
- the result returned from the main visitor method
-
scan
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 scannedp
- a value to be passed to visitor methods- Returns:
- the result returned from the main visitor method
-
getCurrentPath
Returns the current path for the node, as built up by the currently active set of scan calls.- Returns:
- the current path
-