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. UseVoidfor visitors that do not need to return results.P- the type of the additional parameter to this visitor's methods. UseVoidfor 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, visitVersionModifier and TypeMethodDescriptionReduces two results into a combined result.Scans a sequence of nodes.visitAttribute(AttributeTree node, P p) Visits anAttributeTreenode.visitAuthor(AuthorTree node, P p) Visits anAuthorTreenode.visitComment(CommentTree node, P p) Visits aCommentTreenode.visitDeprecated(DeprecatedTree node, P p) Visits aDeprecatedTreenode.visitDocComment(DocCommentTree node, P p) Visits aDocCommentTreenode.visitDocRoot(DocRootTree node, P p) Visits aDocRootTreenode.visitDocType(DocTypeTree node, P p) Visits aDocTypeTreenode.visitEndElement(EndElementTree node, P p) Visits anEndElementTreenode.visitEntity(EntityTree node, P p) Visits anEntityTreenode.visitErroneous(ErroneousTree node, P p) Visits anErroneousTreenode.visitEscape(EscapeTree node, P p) Visits anEscapeTreenode.visitHidden(HiddenTree node, P p) Visits aHiddenTreenode.visitIdentifier(IdentifierTree node, P p) Visits anIdentifierTreenode.visitIndex(IndexTree node, P p) Visits anIndexTreenode.visitInheritDoc(InheritDocTree node, P p) Visits anInheritDocTreenode.Visits aLinkTreenode.visitLiteral(LiteralTree node, P p) Visits anLiteralTreenode.visitOther(DocTree node, P p) Visits an unknown type ofDocTreenode.visitParam(ParamTree node, P p) Visits aParamTreenode.visitProvides(ProvidesTree node, P p) Visits aProvidesTreenode.visitRawText(RawTextTree node, P p) Visits aRawTextTreenode.visitReference(ReferenceTree node, P p) Visits aReferenceTreenode.visitReturn(ReturnTree node, P p) Visits aReturnTreenode.Visits aSeeTreenode.visitSerial(SerialTree node, P p) Visits aSerialTreenode.visitSerialData(SerialDataTree node, P p) Visits aSerialDataTreenode.visitSerialField(SerialFieldTree node, P p) Visits aSerialFieldTreenode.visitSince(SinceTree node, P p) Visits aSinceTreenode.visitSnippet(SnippetTree node, P p) Visits aSnippetTreenode.Visits aSpecTreenode.visitStartElement(StartElementTree node, P p) Visits aStartElementTreenode.visitSummary(SummaryTree node, P p) Visits aSummaryTreenode.visitSystemProperty(SystemPropertyTree node, P p) Visits aSystemPropertyTreenode.Visits aTextTreenode.visitThrows(ThrowsTree node, P p) Visits aThrowsTreenode.visitUnknownBlockTag(UnknownBlockTagTree node, P p) Visits anUnknownBlockTagTreenode.visitUnknownInlineTag(UnknownInlineTagTree node, P p) Visits anUnknownInlineTagTreenode.Visits aUsesTreenode.visitValue(ValueTree node, P p) Visits aValueTreenode.visitVersion(VersionTree node, P p) Visits aVersionTreenode.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.booleanIndicates whether some other object is "equal to" this one.protected voidfinalize()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.inthashCode()Returns a hash code value for this object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(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 voidwait(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:
scanin 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
-