类的用途
com.sun.source.util.DocTreePath
使用 DocTreePath 的包
包
描述
为抽象语法树 (AST) 的操作提供实用程序。
Doclet API 提供了一个环境,结合语言模型 API 和编译器树 API,允许客户端检查程序和库的源代码级结构,包括嵌入在源代码中的 API 注解。
-
DocTreePath 在 com.sun.source.util 中的用法
com.sun.source.util 中返回 DocTreePath 的方法修饰符和类型方法描述DocTreePathScanner.getCurrentPath()返回节点的当前路径,由当前活动的扫描调用集构建。abstract DocTreePathDocTrees.getDocTreePath(FileObject fileObject, PackageElement packageElement) 返回包含给定文件的文档注释树的文档树路径。DocTreePath.getParentPath()返回封闭节点的路径,如果没有封闭节点,则返回null。static DocTreePathDocTreePath.getPath(DocTreePath path, DocTree target) 返回由DocTreePath对象标识的子树中树节点的文档树路径,如果未找到该节点,则返回null。static DocTreePathDocTreePath.getPath(TreePath treePath, DocCommentTree doc, DocTree target) 返回编译单元内树节点的文档树路径,如果未找到该节点,则返回null。com.sun.source.util 中的方法,参数类型为 DocTreePath修饰符和类型方法描述abstract ElementDocTrees.getElement(DocTreePath path) 返回给定DocTreePath或null的叶节点引用的语言模型元素(如果未知)。static DocTreePathDocTreePath.getPath(DocTreePath path, DocTree target) 返回由DocTreePath对象标识的子树中树节点的文档树路径,如果未找到该节点,则返回null。abstract TypeMirrorDocTrees.getType(DocTreePath path) 返回给定DocTreePath或null的叶节点引用的语言模型类型(如果未知)。DocTreePathScanner.scan(DocTreePath path, P p) 从树路径标识的位置扫描树。com.sun.source.util 中的构造函数,参数类型为 DocTreePath -
DocTreePath 在 jdk.javadoc.doclet 中的用法
jdk.javadoc.doclet 中的方法,参数类型为 DocTreePath修饰符和类型方法描述default voidReporter.print(Diagnostic.Kind kind, DocTreePath path, int start, int pos, int end, String message) 打印与树节点中字符范围内的位置相关的诊断消息。voidReporter.print(Diagnostic.Kind kind, DocTreePath path, String message) 在文档注释中打印与树节点相关的诊断消息。