DocumentationTool (Java SE 10 & JDK 10 ) (original) (raw)
- All Superinterfaces:
[OptionChecker](../../javax/tools/OptionChecker.html "interface in javax.tools")
,[Tool](../../javax/tools/Tool.html "interface in javax.tools")
public interface DocumentationTool
extends Tool, OptionChecker
Interface to invoke Java™ programming language documentation tools from programs.
Since:
1.8
Nested Class Summary
Nested Classes
Modifier and Type Interface Description static interface DocumentationTool.DocumentationTask Interface representing a future for a documentation task. static class DocumentationTool.Location Locations specific to DocumentationTool. Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method Description StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener,Locale locale,Charset charset) Returns a new instance of the standard file manager implementation for this tool. DocumentationTool.DocumentationTask getTask(Writer out,JavaFileManager fileManager,DiagnosticListener diagnosticListener,[Class](../../java/lang/Class.html "class in java.lang") docletClass,Iterable<String> options,Iterable<? extends JavaFileObject> compilationUnits) Creates a future for a documentation task with the given components and arguments. * ### Methods declared in interface javax.tools.[OptionChecker](../../javax/tools/OptionChecker.html "interface in javax.tools") `[isSupportedOption](../../javax/tools/OptionChecker.html#isSupportedOption%28java.lang.String%29)` * ### Methods declared in interface javax.tools.[Tool](../../javax/tools/Tool.html "interface in javax.tools") `[getSourceVersions](../../javax/tools/Tool.html#getSourceVersions%28%29), [name](../../javax/tools/Tool.html#name%28%29), [run](../../javax/tools/Tool.html#run%28java.io.InputStream,java.io.OutputStream,java.io.OutputStream,java.lang.String...%29)`
Method Detail
* #### getTask [DocumentationTool.DocumentationTask](../../javax/tools/DocumentationTool.DocumentationTask.html "interface in javax.tools") getTask([Writer](../../java/io/Writer.html "class in java.io") out, [JavaFileManager](../../javax/tools/JavaFileManager.html "interface in javax.tools") fileManager, [DiagnosticListener](../../javax/tools/DiagnosticListener.html "interface in javax.tools")<? super [JavaFileObject](../../javax/tools/JavaFileObject.html "interface in javax.tools")> diagnosticListener, [Class](../../java/lang/Class.html "class in java.lang")<?> docletClass, [Iterable](../../java/lang/Iterable.html "interface in java.lang")<[String](../../java/lang/String.html "class in java.lang")> options, [Iterable](../../java/lang/Iterable.html "interface in java.lang")<? extends [JavaFileObject](../../javax/tools/JavaFileObject.html "interface in javax.tools")> compilationUnits) Parameters: `out` \- a Writer for additional output from the tool; use `System.err` if `null` `fileManager` \- a file manager; if `null` use the tool's standard filemanager `diagnosticListener` \- a diagnostic listener; if `null` use the tool's default method for reporting diagnostics `docletClass` \- a class providing the necessary methods required of a doclet; a value of `null` 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](../../java/lang/RuntimeException.html "class in java.lang")` \- if an unrecoverable error occurred in a user supplied component. The[cause](../../java/lang/Throwable.html#getCause%28%29) will be the error in user code. `[IllegalArgumentException](../../java/lang/IllegalArgumentException.html "class in java.lang")` \- if any of the given compilation units are of other kind than[source](../../javax/tools/JavaFileObject.Kind.html#SOURCE) * #### getStandardFileManager [StandardJavaFileManager](../../javax/tools/StandardJavaFileManager.html "interface in javax.tools") getStandardFileManager([DiagnosticListener](../../javax/tools/DiagnosticListener.html "interface in javax.tools")<? super [JavaFileObject](../../javax/tools/JavaFileObject.html "interface in javax.tools")> diagnosticListener, [Locale](../../java/util/Locale.html "class in java.util") locale, [Charset](../../java/nio/charset/Charset.html "class in java.nio.charset") charset) Returns a new instance of the standard file manager implementation for this tool. The file manager will use the given diagnostic listener for producing any non-fatal diagnostics. Fatal errors will be signaled with the appropriate exceptions. 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; if `null` use the compiler's default method for reporting diagnostics `locale` \- the locale to apply when formatting diagnostics;`null` means the [default locale](../../java/util/Locale.html#getDefault%28%29). `charset` \- the character set used for decoding bytes; if`null` use the platform default Returns: the standard file manager
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2018, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.