Todo
describe com.sun.tools.javac.api.Tool
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public static JavacTool | Returns: new instance of this toolStatic factory method for creating new instances of this tool. |
public Set | getSourceVersions()
Implements javax. |
public JavacFileManager | getStandardFileManager(DiagnosticListener<? super JavaFileObject>
a diagnostic listener for non-fatal
diagnostics; if diagnosticListener, Locale null use the compiler's default method
for reporting diagnosticsthe locale to apply when formatting diagnostics;
locale, Charset null means the default locale.the character set used for decoding bytes; if
charset)null use the platform defaultImplements javax. |
public JavacTask | getTask(Writer
a Writer for additional output from the compiler;
use out, JavaFileManager System.err if null a file manager; if fileManager, DiagnosticListener<? super JavaFileObject> null use the
compiler's standard file managera diagnostic listener; if diagnosticListener, Iterable<String> null use the compiler's default method for reporting
diagnosticscompiler options, options, Iterable<String> null means no optionsnames of classes to be processed by annotation
processing, classes, Iterable<? extends JavaFileObject> null means no class namesthe compilation units to compile, compilationUnits)null means no compilation unitsImplements javax. |
public JavacTask | getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits, Context context)
|
public int | isSupportedOption(String
an option option)Implements javax. |
public String | name()
Overrides default javax. |
public int | run(InputStream
"standard" input; use System.in if null in, OutputStream "standard" output; use System.out if null out, OutputStream "standard" error; use System.err if null err, String... arguments to pass to the tool arguments)Implements javax. |
JavacTool | back to summary |
---|---|
public JavacTool()
Deprecated
Constructor used by service provider mechanism. The recommended way to
obtain an instance of this class is by using
|
create | back to summary |
---|---|
public static JavacTool create() Static factory method for creating new instances of this tool.
|
getSourceVersions | back to summary |
---|---|
public Set Implements javax. Doc from javax. Returns the source versions of the Java programming language supported by this tool.
|
getStandardFileManager | back to summary |
---|---|
public JavacFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset) Implements javax. Doc from javax. 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
|
getTask | back to summary |
---|---|
public JavacTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits) Implements javax. Doc from javax. Creates a future for a compilation task with the given components and arguments. The compilation might not have completed as described in the CompilationTask interface. If a file manager is provided, it must be able to handle all
locations defined in Note that annotation processing can process both the
compilation units of source code to be compiled, passed with
the
|
getTask | back to summary |
---|---|
public JavacTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits, Context context) |
isSupportedOption | back to summary |
---|---|
public int isSupportedOption(String option) Implements javax. Doc from javax. Determines if the given option is supported and if so, the number of arguments the option takes.
|
name | back to summary |
---|---|
public String name() Overrides default javax. Doc from javax. Returns the name of this tool, or an empty string if no name is provided.
|
run | back to summary |
---|---|
public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) Implements javax. Doc from javax. 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
|