APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.javadoc.internal.tool

public Class Main

extends Object
Class Inheritance
Imports
javax.tools.JavaFileManager, .StandardJavaFileManager, java.io.PrintWriter, java.util.Objects, com.sun.tools.javac.util.Context

Provides external entry points (tool and programmatic) for the javadoc program.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private PrintWriter
private StandardJavaFileManager
private PrintWriter

Constructor Summary

AccessConstructor and Description
public
Main()

Creates a default builder to run javadoc.

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

The return code.
execute
(String...
the command-line parameters
args
)

Programmatic interface.

public static int

Returns:

The return code.
execute
(String[]
the command-line parameters
args
,
PrintWriter
a stream for all output
writer
)

Programmatic interface.

public static int

Returns:

The return code.
execute
(String[]
the command-line parameters
args
,
PrintWriter
a stream for expected output
outWriter
,
PrintWriter
a stream for diagnostic output
errWriter
)

Programmatic interface.

public static void
main(String...
the command-line parameters
args
)

The main entry point called by the launcher.

public Main.Result

Returns:

a value indicating the success or otherwise of the run
run
(String...
the arguments
args
)

Runs javadoc with preconfigured values and a given set of arguments.

public Main

Returns:

this object
setFileManager
(StandardJavaFileManager
the file manager to use
fileManager
)

Sets the file manager to be used when running javadoc.

public Main

Returns:

this object
setStreams
(PrintWriter
the output stream
outWriter
,
PrintWriter
the error stream
errWriter
)

Sets the output and error streams to be used when running javadoc.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

errWriterback to summary
private PrintWriter errWriter
fileManagerback to summary
private StandardJavaFileManager fileManager
outWriterback to summary
private PrintWriter outWriter

Constructor Detail

Mainback to summary
public Main()

Creates a default builder to run javadoc.

Method Detail

executeback to summary
public static int execute(String... args)

Programmatic interface.

Parameters
args:String[]

the command-line parameters

Returns:int

The return code.

executeback to summary
public static int execute(String[] args, PrintWriter writer)

Programmatic interface.

Parameters
args:String[]

the command-line parameters

writer:PrintWriter

a stream for all output

Returns:int

The return code.

executeback to summary
public static int execute(String[] args, PrintWriter outWriter, PrintWriter errWriter)

Programmatic interface.

Parameters
args:String[]

the command-line parameters

outWriter:PrintWriter

a stream for expected output

errWriter:PrintWriter

a stream for diagnostic output

Returns:int

The return code.

mainback to summary
public static void main(String... args)

The main entry point called by the launcher. This will call System.exit with an appropriate return value.

Parameters
args:String[]

the command-line parameters

runback to summary
public Main.Result run(String... args)

Runs javadoc with preconfigured values and a given set of arguments. Any errors will be reported to the error stream, or to System#err if no error stream has been specified with setStreams.

Parameters
args:String[]

the arguments

Returns:Main.Result

a value indicating the success or otherwise of the run

setFileManagerback to summary
public Main setFileManager(StandardJavaFileManager fileManager)

Sets the file manager to be used when running javadoc. A value of null means to use the default file manager.

Parameters
fileManager:StandardJavaFileManager

the file manager to use

Returns:Main

this object

setStreamsback to summary
public Main setStreams(PrintWriter outWriter, PrintWriter errWriter)

Sets the output and error streams to be used when running javadoc. The streams may be the same; they must not be null.

Parameters
outWriter:PrintWriter

the output stream

errWriter:PrintWriter

the error stream

Returns:Main

this object

jdk.javadoc.internal.tool back to summary

public final Enum Main.Result

extends Enum<Main.Result>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Main.Result
ABNORMAL

Terminated abnormally

public static final Main.Result
CMDERR

Bad command-line arguments

public static final Main.Result
ERROR

Completed with reported errors

public final int
public static final Main.Result
OK

completed with no errors

public static final Main.Result
SYSERR

System error or resource exhaustion

Constructor Summary

AccessConstructor and Description
private
Result(int exitCode)

Method Summary

Modifier and TypeMethod and Description
public boolean
isOK()

public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.

public static Main.Result
public static Main.Result[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

ABNORMALback to summary
public static final Main.Result ABNORMAL

Terminated abnormally

CMDERRback to summary
public static final Main.Result CMDERR

Bad command-line arguments

ERRORback to summary
public static final Main.Result ERROR

Completed with reported errors

exitCodeback to summary
public final int exitCode
OKback to summary
public static final Main.Result OK

completed with no errors

SYSERRback to summary
public static final Main.Result SYSERR

System error or resource exhaustion

Constructor Detail

Resultback to summary
private Result(int exitCode)

Method Detail

isOKback to summary
public boolean isOK()
toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Annotations
@Override
valueOfback to summary
public static Main.Result valueOf(String name)
valuesback to summary
public static Main.Result[] values()