public interface DocumentationTool extends Tool, OptionChecker
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DocumentationTool.DocumentationTask
表示文档任务的未来的接口。
|
static class |
DocumentationTool.Location
特定于 DocumentationTool的地点 。
|
| Modifier and Type | Method and Description |
|---|---|
StandardJavaFileManager |
getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
获取此工具的标准文件管理器实现的新实例。
|
DocumentationTool.DocumentationTask |
getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, 类<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)
使用给定的组件和参数为文档任务创建未来。
|
getSourceVersions, runisSupportedOptionDocumentationTool.DocumentationTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, 类<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)
如果提供了文件管理器,它必须能够处理中定义的所有位置DocumentationTool.Location ,以及StandardLocation.SOURCE_PATH , StandardLocation.CLASS_PATH和StandardLocation.PLATFORM_CLASS_PATH 。
out - 一个作者从工具的额外输出;
使用System.err如果null
fileManager - 文件管理器;
如果null使用工具的标准文件管理器
diagnosticListener - 诊断听众;
如果null使用工具的默认方法来报告诊断
docletClass - 提供doclet所需必需方法的类
options - 文档工具选项和doclet选项,
null表示无选项
compilationUnits - 汇编单位编译,
null表示无编译单位
RuntimeException - 如果在用户提供的组件中发生不可恢复的错误。
cause将是用户代码中的错误。
IllegalArgumentException - 如果任何给定的编译单位是其他类型的,
那么source
StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
标准文件管理器将在调用flush或close之后被访问时自动重新打开。 标准文件管理器必须与其他工具一起使用。
diagnosticListener - 用于非致命诊断的诊断侦听器;
如果null使用编译器的默认方法来报告诊断
locale - 格式化诊断时要应用的区域设置;
null是指default locale 。
charset - 用于解码字节的字符集;
如果null使用平台默认
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.