public class DocTreePath extends Object implements Iterable<DocTree>
DocCommentTree node.| Constructor | Description | 
|---|---|
| DocTreePath | Creates a  DocTreePathfor a child node. | 
| DocTreePath | Creates a  DocTreePathfor a root node. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| DocCommentTree | getDocComment() | Returns the  DocCommentTreeassociated with this path. | 
| DocTree | getLeaf() | Returns the leaf node for this path. | 
| DocTreePath | getParentPath() | Returns the path for the enclosing node, or  nullif there is no enclosing node. | 
| static DocTreePath | getPath | Returns a documentation tree path for a tree node within a subtree identified by a  DocTreePathobject, ornullif the node is not found. | 
| static DocTreePath | getPath | Returns a documentation tree path for a tree node within a compilation unit, or  nullif the node is not found. | 
| TreePath | getTreePath() | Returns the  TreePathassociated with this path. | 
| Iterator | iterator() | Returns an iterator over elements of type  T. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DocTreePath(TreePath treePath, DocCommentTree t)
DocTreePath for a root node.treePath - the TreePath from which the root node was createdt - the DocCommentTree to create the path forpublic DocTreePath(DocTreePath p, DocTree t)
DocTreePath for a child node.p - the parent nodet - the child nodepublic static DocTreePath getPath(TreePath treePath, DocCommentTree doc, DocTree target)
null if the node is not found.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 commentpublic static DocTreePath getPath(DocTreePath path, DocTree target)
DocTreePath object, or null if the node is not found.path - a path identifying a node within a doc comment treetarget - a node to be located within the given nodepublic TreePath getTreePath()
TreePath associated with this path.TreePath for this DocTreePath
public DocCommentTree getDocComment()
DocCommentTree associated with this path.DocCommentTree for this DocTreePath
public DocTree getLeaf()
DocTree for this DocTreePath
public DocTreePath getParentPath()
null if there is no enclosing node.DocTreePath of parentpublic Iterator<DocTree> iterator()
IterableT.
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/jdk.compiler/com/sun/source/util/DocTreePath.html