- java.lang.Object
-
- com.sun.source.util.DocTreePath
-
-
构造方法摘要
构造方法 Constructor 描述 DocTreePath(DocTreePath p, DocTree t)为子节点创建DocTreePath。DocTreePath(TreePath treePath, DocCommentTree t)为根节点创建DocTreePath。
-
方法摘要
所有方法 静态方法 接口方法 具体的方法 Modifier and Type 方法 描述 DocCommentTreegetDocComment()返回与此路径相关联的DocCommentTree。DocTreegetLeaf()返回此路径的叶节点。DocTreePathgetParentPath()返回包围节点的路径,如果没有包围节点,则返回null。static DocTreePathgetPath(DocTreePath path, DocTree target)返回由DocTreePath对象标识的子树内的树节点的文档树路径,如果未找到该节点,则null。static DocTreePathgetPath(TreePath treePath, DocCommentTree doc, DocTree target)返回编译单元中树节点的文档树路径,如果未找到该节点,则null。TreePathgetTreePath()返回与此路径相关联的TreePath。Iterator<DocTree>iterator()返回类型为T元素的迭代器。-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
构造方法详细信息
-
DocTreePath
public DocTreePath(TreePath treePath, DocCommentTree t)
为根节点创建DocTreePath。- 参数
-
treePath- 创建根节点的TreePath。 -
t- DocCommentTree创建路径。
-
DocTreePath
public DocTreePath(DocTreePath p, DocTree t)
为子节点创建DocTreePath。- 参数
-
p- 父节点 -
t- 子节点
-
-
方法详细信息
-
getPath
public static DocTreePath getPath(TreePath treePath, DocCommentTree doc, DocTree target)
返回编译单元中树节点的文档树路径,如果未找到该节点,则null。- 参数
-
treePath- 与该文档注释相关联的节点的路径 -
doc- 与节点相关联的文档注释 -
target- doc注释中的一个节点 - 结果
- 确定树中目标的路径
-
getPath
public static DocTreePath getPath(DocTreePath path, DocTree target)
返回由DocTreePath对象标识的子树内的树节点的文档树路径,如果未找到节点,则null。- 参数
-
path- 标识doc注释树中节点的路径 -
target- 要位于给定节点内的节点 - 结果
- 标识目标节点的路径
-
getTreePath
public TreePath getTreePath()
返回与此路径相关联的TreePath。- 结果
- 该DocTreePath的TreePath
-
getDocComment
public DocCommentTree getDocComment()
返回与此路径相关联的DocCommentTree。- 结果
- DocTreePath的DocCommentTree
-
getLeaf
public DocTree getLeaf()
返回此路径的叶节点。- 结果
- 该DocTreePath的DocTree
-
getParentPath
public DocTreePath getParentPath()
返回包围节点的路径,如果没有包围节点,则返回null。- 结果
- 父文件的DocTreePath
-
-