APIdia Launch Partner
Top Description Constructors Methods
jdk.javadoc.internal.api

public Class JavadocTool

extends Object
implements DocumentationTool
Class Inheritance
All Implemented Interfaces
javax.tools.DocumentationTool, javax.tools.OptionChecker, javax.tools.Tool
Imports
java.io.InputStream, .OutputStream, .OutputStreamWriter, .PrintWriter, .Writer, java.nio.charset.Charset, java.util.Collections, .EnumSet, .Locale, .Objects, .Set, javax.lang.model.SourceVersion, javax.tools.DiagnosticListener, .DocumentationTool, .JavaFileManager, .JavaFileObject, .StandardJavaFileManager, com.sun.tools.javac.api.ClientCodeWrapper, com.sun.tools.javac.file.JavacFileManager, .BaseFileManager, com.sun.tools.javac.util.ClientCodeException, .Context, .Log, jdk.javadoc.internal.tool.ToolOptions

Provides access to functionality specific to the JDK documentation tool, javadoc.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Set<SourceVersion>
getSourceVersions()

Implements javax.tools.Tool.getSourceVersions.

Returns the source versions of the Java programming language supported by this tool.

public StandardJavaFileManager
getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)

Implements javax.tools.DocumentationTool.getStandardFileManager.

Returns a new instance of the standard file manager implementation for this tool.

public DocumentationTool.DocumentationTask
getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)

Implements javax.tools.DocumentationTool.getTask.

Creates a future for a documentation task with the given components and arguments.

public DocumentationTool.DocumentationTask
getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits, Context context)

public int
isSupportedOption(String option)

Implements javax.tools.OptionChecker.isSupportedOption.

Determines if the given option is supported and if so, the number of arguments the option takes.

public String
name()

Overrides default javax.tools.Tool.name.

Returns the name of this tool, or an empty string if no name is provided.

public int
run(InputStream in, OutputStream out, OutputStream err, String... arguments)

Implements javax.tools.Tool.run.

Run the tool with the given I/O channels and arguments.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JavadocToolback to summary
public JavadocTool()

Method Detail

getSourceVersionsback to summary
public Set<SourceVersion> getSourceVersions()

Implements javax.tools.Tool.getSourceVersions.

Doc from javax.tools.Tool.getSourceVersions.

Returns the source versions of the Java programming language supported by this tool.

Annotations
@Override
getStandardFileManagerback to summary
public StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)

Implements javax.tools.DocumentationTool.getStandardFileManager.

Doc from javax.tools.DocumentationTool.getStandardFileManager.

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.

Annotations
@Override
getTaskback to summary
public DocumentationTool.DocumentationTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits)

Implements javax.tools.DocumentationTool.getTask.

Doc from javax.tools.DocumentationTool.getTask.

Creates a future for a documentation task with the given components and arguments. The task might not have completed as described in the DocumentationTask interface.

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.

Annotations
@Override
getTaskback to summary
public DocumentationTool.DocumentationTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Class<?> docletClass, Iterable<String> options, Iterable<? extends JavaFileObject> compilationUnits, Context context)
isSupportedOptionback to summary
public int isSupportedOption(String option)

Implements javax.tools.OptionChecker.isSupportedOption.

Doc from javax.tools.OptionChecker.isSupportedOption.

Determines if the given option is supported and if so, the number of arguments the option takes.

Annotations
@Override
nameback to summary
public String name()

Overrides default javax.tools.Tool.name.

Doc from javax.tools.Tool.name.

Returns the name of this tool, or an empty string if no name is provided.

Annotations
@Override
runback to summary
public int run(InputStream in, OutputStream out, OutputStream err, String... arguments)

Implements javax.tools.Tool.run.

Doc from javax.tools.Tool.run.

Run the tool with the given I/O channels and arguments. By convention a tool returns 0 for success and nonzero for errors. Any diagnostics generated will be written to either out or err in some unspecified format.

Annotations
@Override