Interface DocumentationTool
- All Superinterfaces:
-
OptionChecker
,Tool
public interface DocumentationTool extends Tool, OptionChecker
- Since:
- 1.8
Nested Class Summary
Modifier and Type | Interface | Description |
---|---|---|
static interface |
DocumentationTool.DocumentationTask |
Interface representing a future for a documentation task. |
static enum |
DocumentationTool.Location |
Locations specific to DocumentationTool . |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
StandardJavaFileManager |
getStandardFileManager |
Returns a new instance of the standard file manager implementation for this tool. |
DocumentationTool.DocumentationTask |
getTask |
Creates a future for a documentation task with the given components and arguments. |
Methods declared in interface javax.tools.OptionChecker
isSupportedOption
Methods declared in interface javax.tools.Tool
getSourceVersions, name, run
Method Details
getTask
DocumentationTool.DocumentationTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)
If a file manager is provided, it must be able to handle all locations defined in DocumentationTool.Location
, as well as StandardLocation.SOURCE_PATH
, StandardLocation.CLASS_PATH
, and StandardLocation.PLATFORM_CLASS_PATH
.
- Parameters:
-
out
- a Writer for additional output from the tool; useSystem.err
ifnull
-
fileManager
- a file manager; ifnull
use the tool's standard file manager -
diagnosticListener
- a diagnostic listener; ifnull
use the tool's default method for reporting diagnostics -
docletClass
- a class providing the necessary methods required of a doclet; a value ofnull
means to use the standard doclet. -
options
- documentation tool options and doclet options,null
means no options -
compilationUnits
- the compilation units to compile,null
means no compilation units - Returns:
- an object representing the compilation
- Throws:
-
RuntimeException
- if an unrecoverable error occurred in a user supplied component. The cause will be the error in user code. -
IllegalArgumentException
- if any of the given compilation units are of other kind than source
getStandardFileManager
StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
The standard file manager will be automatically reopened if it is accessed after calls to flush
or close
. The standard file manager must be usable with other tools.
- Parameters:
-
diagnosticListener
- a diagnostic listener for non-fatal diagnostics; ifnull
use the compiler's default method for reporting diagnostics -
locale
- the locale to apply when formatting diagnostics;null
means the default locale. -
charset
- the character set used for decoding bytes; ifnull
use the platform default - Returns:
- the standard file manager
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/java.compiler/javax/tools/DocumentationTool.html