Class DocTreePath
java.lang.Object
com.sun.source.util.DocTreePath
-
Constructor Summary
ConstructorsConstructorDescriptionDocTreePath(DocTreePath p, DocTree t) Creates aDocTreePathfor a child node.DocTreePath(TreePath treePath, DocCommentTree t) Creates aDocTreePathfor a root node. -
Method Summary
Modifier and TypeMethodDescriptionReturns theDocCommentTreeassociated with this path.getLeaf()Returns the leaf node for this path.Returns the path for the enclosing node, ornullif there is no enclosing node.static DocTreePathgetPath(DocTreePath path, DocTree target) Returns a documentation tree path for a tree node within a subtree identified by aDocTreePathobject, ornullif the node is not found.static DocTreePathgetPath(TreePath treePath, DocCommentTree doc, DocTree target) Returns a documentation tree path for a tree node within a compilation unit, ornullif the node is not found.Returns theTreePathassociated with this path.iterator()Returns an iterator over elements of typeT.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.Methods declared in interface Iterable
forEach, spliteratorModifier and TypeMethodDescriptiondefault voidPerforms the given action for each element of theIterableuntil all elements have been processed or the action throws an exception.default Spliterator<DocTree> Creates aSpliteratorover the elements described by thisIterable.
-
Constructor Details
-
DocTreePath
Creates aDocTreePathfor a root node.- Parameters:
treePath- theTreePathfrom which the root node was createdt- theDocCommentTreeto create the path for
-
DocTreePath
Creates aDocTreePathfor a child node.- Parameters:
p- the parent nodet- the child node
-
-
Method Details
-
getPath
Returns a documentation tree path for a tree node within a compilation unit, ornullif the node is not found.- Parameters:
treePath- the path for the node with which the doc comment is associateddoc- the doc comment associated with the nodetarget- a node within the doc comment- Returns:
- a path identifying the target within the tree
-
getPath
Returns a documentation tree path for a tree node within a subtree identified by aDocTreePathobject, ornullif the node is not found.- Parameters:
path- a path identifying a node within a doc comment treetarget- a node to be located within the given node- Returns:
- a path identifying the target node
-
getTreePath
Returns theTreePathassociated with this path.- Returns:
- the
TreePathfor thisDocTreePath
-
getDocComment
Returns theDocCommentTreeassociated with this path.- Returns:
- the
DocCommentTreefor thisDocTreePath
-
getLeaf
Returns the leaf node for this path.- Returns:
- the
DocTreefor thisDocTreePath
-
getParentPath
Returns the path for the enclosing node, ornullif there is no enclosing node.- Returns:
DocTreePathof parent
-
iterator
-