public class JavahTool extends Object implements NativeHeaderTool
NativeHeaderTool.NativeHeaderTask
Constructor and Description |
---|
JavahTool() |
Modifier and Type | Method and Description |
---|---|
Set<SourceVersion> |
getSourceVersions() |
StandardJavaFileManager |
getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener,
Locale locale,
Charset charset)
Gets a new instance of the standard file manager implementation
for this tool.
|
NativeHeaderTool.NativeHeaderTask |
getTask(Writer out,
JavaFileManager fileManager,
DiagnosticListener<? super JavaFileObject> diagnosticListener,
Iterable<String> options,
Iterable<String> classes)
Creates a future for a native header task with the given
components and arguments.
|
int |
isSupportedOption(String option) |
int |
run(InputStream in,
OutputStream out,
OutputStream err,
String... arguments) |
public NativeHeaderTool.NativeHeaderTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes)
NativeHeaderTool
If a file manager is provided, it must be able to handle all
locations defined in StandardLocation
.
getTask
in interface NativeHeaderTool
out
- a Writer for additional output from the task;
use System.err
if null
fileManager
- a file manager; if null
use the
task's standard filemanagerdiagnosticListener
- a diagnostic listener; if null
use the compiler's default method for reporting
diagnosticsoptions
- task options, null
means no optionsclasses
- class names for which native headers should be generatedpublic StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset)
NativeHeaderTool
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.
getStandardFileManager
in interface NativeHeaderTool
diagnosticListener
- a diagnostic listener for non-fatal
diagnostics; if null
use the tool's default method
for reporting diagnosticslocale
- the locale to apply when formatting diagnostics;
null
means the default locale.charset
- the character set used for decoding bytes; if
null
use the platform defaultpublic int run(InputStream in, OutputStream out, OutputStream err, String... arguments)
public Set<SourceVersion> getSourceVersions()
getSourceVersions
in interface Tool
public int isSupportedOption(String option)
isSupportedOption
in interface OptionChecker
Copyright © 2017 earcam. All rights reserved.