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()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
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
-