Class DocTreePathScanner<R,P>
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
Constructors -
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 DocTreeScanner
reduce, scan, visitAttribute, visitAuthor, visitComment, visitDeprecated, visitDocComment, visitDocRoot, visitDocType, visitEndElement, visitEntity, visitErroneous, visitEscape, visitHidden, visitIdentifier, visitIndex, visitInheritDoc, visitLink, visitLiteral, visitOther, visitParam, visitProvides, visitRawText, visitReference, visitReturn, visitSee, visitSerial, visitSerialData, visitSerialField, visitSince, visitSnippet, visitSpec, visitStartElement, visitSummary, visitSystemProperty, visitText, visitThrows, visitUnknownBlockTag, visitUnknownInlineTag, visitUses, visitValue, visitVersion
Modifier and TypeMethodDescriptionReduces two results into a combined result.Scans a sequence of nodes.visitAttribute
(AttributeTree node, P p) Visits anAttributeTree
node.visitAuthor
(AuthorTree node, P p) Visits anAuthorTree
node.visitComment
(CommentTree node, P p) Visits aCommentTree
node.visitDeprecated
(DeprecatedTree node, P p) Visits aDeprecatedTree
node.visitDocComment
(DocCommentTree node, P p) Visits aDocCommentTree
node.visitDocRoot
(DocRootTree node, P p) Visits aDocRootTree
node.visitDocType
(DocTypeTree node, P p) Visits aDocTypeTree
node.visitEndElement
(EndElementTree node, P p) Visits anEndElementTree
node.visitEntity
(EntityTree node, P p) Visits anEntityTree
node.visitErroneous
(ErroneousTree node, P p) Visits anErroneousTree
node.visitEscape
(EscapeTree node, P p) Visits anEscapeTree
node.visitHidden
(HiddenTree node, P p) Visits aHiddenTree
node.visitIdentifier
(IdentifierTree node, P p) Visits anIdentifierTree
node.visitIndex
(IndexTree node, P p) Visits anIndexTree
node.visitInheritDoc
(InheritDocTree node, P p) Visits anInheritDocTree
node.Visits aLinkTree
node.visitLiteral
(LiteralTree node, P p) Visits anLiteralTree
node.visitOther
(DocTree node, P p) Visits an unknown type ofDocTree
node.visitParam
(ParamTree node, P p) Visits aParamTree
node.visitProvides
(ProvidesTree node, P p) Visits aProvidesTree
node.visitRawText
(RawTextTree node, P p) Visits aRawTextTree
node.visitReference
(ReferenceTree node, P p) Visits aReferenceTree
node.visitReturn
(ReturnTree node, P p) Visits aReturnTree
node.Visits aSeeTree
node.visitSerial
(SerialTree node, P p) Visits aSerialTree
node.visitSerialData
(SerialDataTree node, P p) Visits aSerialDataTree
node.visitSerialField
(SerialFieldTree node, P p) Visits aSerialFieldTree
node.visitSince
(SinceTree node, P p) Visits aSinceTree
node.visitSnippet
(SnippetTree node, P p) Visits aSnippetTree
node.Visits aSpecTree
node.visitStartElement
(StartElementTree node, P p) Visits aStartElementTree
node.visitSummary
(SummaryTree node, P p) Visits aSummaryTree
node.visitSystemProperty
(SystemPropertyTree node, P p) Visits aSystemPropertyTree
node.Visits aTextTree
node.visitThrows
(ThrowsTree node, P p) Visits aThrowsTree
node.visitUnknownBlockTag
(UnknownBlockTagTree node, P p) Visits anUnknownBlockTagTree
node.visitUnknownInlineTag
(UnknownInlineTagTree node, P p) Visits anUnknownInlineTagTree
node.Visits aUsesTree
node.visitValue
(ValueTree node, P p) Visits aValueTree
node.visitVersion
(VersionTree node, P p) Visits aVersionTree
node.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Modifier and TypeMethodDescriptionprotected Object
clone()
Creates and returns a copy of this object.boolean
Indicates whether some other object is "equal to" this one.protected void
finalize()
Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class
<?> getClass()
Returns the runtime class of thisObject
.int
hashCode()
Returns a hash code value for this object.final void
notify()
Wakes up a single thread that is waiting on this object's monitor.final void
Wakes up all threads that are waiting on this object's monitor.toString()
Returns a string representation of the object.final void
wait()
Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final void
wait
(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final void
wait
(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
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
-