java.lang.Object
com.sun.source.util.DocTreePath
树节点的路径,通常用于表示树节点的祖先节点序列,直到顶级
DocCommentTree
节点。
- 自从:
- 1.8
-
构造方法总结
构造方法构造方法描述DocTreePath
(DocTreePath p, DocTree t) 为子节点创建一个DocTreePath
。DocTreePath
(TreePath treePath, DocCommentTree t) 为根节点创建一个DocTreePath
。 -
方法总结
修饰符和类型方法描述返回与此路径关联的DocCommentTree
。getLeaf()
返回此路径的叶节点。返回封闭节点的路径,如果没有封闭节点,则返回null
。static DocTreePath
getPath
(DocTreePath path, DocTree target) 返回由DocTreePath
对象标识的子树中树节点的文档树路径,如果未找到该节点,则返回null
。static DocTreePath
getPath
(TreePath treePath, DocCommentTree doc, DocTree target) 返回编译单元内树节点的文档树路径,如果未找到该节点,则返回null
。返回与此路径关联的TreePath
。iterator()
返回类型为T
的元素的迭代器。在类 java.lang.Object 中声明的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
在接口 java.lang.Iterable 中声明的方法
forEach, spliterator
-
构造方法详细信息
-
DocTreePath
为根节点创建一个DocTreePath
。- 参数:
treePath
- 创建根节点的TreePath
t
-DocCommentTree
为其创建路径
-
DocTreePath
为子节点创建一个DocTreePath
。- 参数:
p
- 父节点t
- 子节点
-
-
方法详情
-
getPath
返回编译单元内树节点的文档树路径,如果未找到该节点,则返回null
。- 参数:
treePath
- 文档注释关联的节点的路径doc
- 与节点关联的文档注释target
- 文档注释中的节点- 返回:
- 识别树中目标的路径
-
getPath
返回由DocTreePath
对象标识的子树中树节点的文档树路径,如果未找到该节点,则返回null
。- 参数:
path
- 标识文档评论树中节点的路径target
- 位于给定节点内的节点- 返回:
- 标识目标节点的路径
-
getTreePath
返回与此路径关联的TreePath
。- 返回:
-
这个
DocTreePath
的TreePath
-
getDocComment
返回与此路径关联的DocCommentTree
。- 返回:
-
这个
DocTreePath
的DocCommentTree
-
getLeaf
返回此路径的叶节点。- 返回:
-
这个
DocTreePath
的DocTree
-
getParentPath
返回封闭节点的路径,如果没有封闭节点,则返回null
。- 返回:
-
父母的
DocTreePath
-
iterator
从接口Iterable
复制的描述返回类型为T
的元素的迭代器。
-