Top Description Fields Constructors Methods
com.sun.source.util

public Class DocTreePathScanner<R, P>

extends DocTreeScanner<R, P>
Class Inheritance
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.
Imports
com.sun.source.doctree.DocTree

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

Field Summary

Modifier and TypeField and Description
private DocTreePath

Constructor Summary

AccessConstructor and Description
public
DocTreePathScanner()

Constructs a DocTreePathScanner.

Method Summary

Modifier and TypeMethod and Description
public DocTreePath

Returns:

the current path
getCurrentPath
()

Returns the current path for the node, as built up by the currently active set of scan calls.

public R

Returns:

the result returned from the main visitor method
scan
(DocTreePath
the path
path
,
P
a value to be passed to visitor methods
p
)

Scans a tree from a position identified by a tree path.

public R

Returns:

the result returned from the main visitor method
scan
(DocTree
the tree to be scanned
tree
,
P
a value to be passed to visitor methods
p
)

Overrides com.sun.source.util.DocTreeScanner.scan.

Scans a single node.
Inherited from com.sun.source.util.DocTreeScanner:
reducescanvisitAttributevisitAuthorvisitCommentvisitDeprecatedvisitDocCommentvisitDocRootvisitDocTypevisitEndElementvisitEntityvisitErroneousvisitEscapevisitHiddenvisitIdentifiervisitIndexvisitInheritDocvisitLinkvisitLiteralvisitOthervisitParamvisitProvidesvisitReferencevisitReturnvisitSeevisitSerialvisitSerialDatavisitSerialFieldvisitSincevisitSnippetvisitSpecvisitStartElementvisitSummaryvisitSystemPropertyvisitTextvisitThrowsvisitUnknownBlockTagvisitUnknownInlineTagvisitUsesvisitValuevisitVersion

Field Detail

pathback to summary
private DocTreePath path

Constructor Detail

DocTreePathScannerback to summary
public DocTreePathScanner()

Constructs a DocTreePathScanner.

Method Detail

getCurrentPathback to summary
public DocTreePath getCurrentPath()

Returns the current path for the node, as built up by the currently active set of scan calls.

Returns:DocTreePath

the current path

scanback to summary
public R scan(DocTreePath path, P p)

Scans a tree from a position identified by a tree path.

Parameters
path:DocTreePath

the path

p:P

a value to be passed to visitor methods

Returns:R

the result returned from the main visitor method

scanback to summary
public R scan(DocTree tree, P p)

Overrides com.sun.source.util.DocTreeScanner.scan.

Scans a single node. The current path is updated for the duration of the scan.

Parameters
tree:DocTree

the tree to be scanned

p:P

a value to be passed to visitor methods

Returns:R

the result returned from the main visitor method

Annotations
@Override