java.lang.Object
com.sun.source.util.DocTreePath
树节点路径,通常用于表示树节点的祖先节点序列,直到顶层
DocCommentTree节点。
- 自版本:
- 1.8
-
Constructor Summary
ConstructorsConstructorDescriptionDocTreePath(DocTreePath p, DocTree t) 为子节点创建一个DocTreePath。DocTreePath(TreePath treePath, DocCommentTree t) 为根节点创建一个DocTreePath。 -
Method Summary
Modifier and TypeMethodDescription返回与此路径关联的DocCommentTree。getLeaf()返回此路径的叶节点。返回封闭节点的路径,如果没有封闭节点则返回null。static DocTreePathgetPath(DocTreePath path, DocTree target) 返回由DocTreePath对象标识的子树中树节点的文档树路径,如果未找到节点则返回null。static DocTreePathgetPath(TreePath treePath, DocCommentTree doc, DocTree target) 返回编译单元中树节点的文档树路径,如果未找到节点则返回null。返回与此路径关联的TreePath。iterator()返回类型为T的元素的迭代器。Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DocTreePath
为根节点创建一个DocTreePath。- 参数:
-
treePath- 创建根节点的TreePath -
t- 要为其创建路径的DocCommentTree
-
DocTreePath
为子节点创建一个DocTreePath。- 参数:
-
p- 父节点 -
t- 子节点
-
-
Method Details
-
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的元素的迭代器。
-