219 */
220 public interface JavaCompiler extends Tool, OptionChecker {
221
222 /**
223 * Creates a future for a compilation task with the given
224 * components and arguments. The compilation might not have
225 * completed as described in the CompilationTask interface.
226 *
227 * <p>If a file manager is provided, it must be able to handle all
228 * locations defined in {@link StandardLocation}.
229 *
230 * <p>Note that annotation processing can process both the
231 * compilation units of source code to be compiled, passed with
232 * the {@code compilationUnits} parameter, as well as class
233 * files, whose names are passed with the {@code classes}
234 * parameter.
235 *
236 * @param out a Writer for additional output from the compiler;
237 * use {@code System.err} if {@code null}
238 * @param fileManager a file manager; if {@code null} use the
239 * compiler's standard filemanager
240 * @param diagnosticListener a diagnostic listener; if {@code
241 * null} use the compiler's default method for reporting
242 * diagnostics
243 * @param options compiler options, {@code null} means no options
244 * @param classes names of classes to be processed by annotation
245 * processing, {@code null} means no class names
246 * @param compilationUnits the compilation units to compile, {@code
247 * null} means no compilation units
248 * @return an object representing the compilation
249 * @throws RuntimeException if an unrecoverable error
250 * occurred in a user supplied component. The
251 * {@linkplain Throwable#getCause() cause} will be the error in
252 * user code.
253 * @throws IllegalArgumentException if any of the options are invalid,
254 * or if any of the given compilation units are of other kind than
255 * {@linkplain JavaFileObject.Kind#SOURCE source}
256 */
257 CompilationTask getTask(Writer out,
258 JavaFileManager fileManager,
259 DiagnosticListener<? super JavaFileObject> diagnosticListener,
|
219 */
220 public interface JavaCompiler extends Tool, OptionChecker {
221
222 /**
223 * Creates a future for a compilation task with the given
224 * components and arguments. The compilation might not have
225 * completed as described in the CompilationTask interface.
226 *
227 * <p>If a file manager is provided, it must be able to handle all
228 * locations defined in {@link StandardLocation}.
229 *
230 * <p>Note that annotation processing can process both the
231 * compilation units of source code to be compiled, passed with
232 * the {@code compilationUnits} parameter, as well as class
233 * files, whose names are passed with the {@code classes}
234 * parameter.
235 *
236 * @param out a Writer for additional output from the compiler;
237 * use {@code System.err} if {@code null}
238 * @param fileManager a file manager; if {@code null} use the
239 * compiler's standard file manager
240 * @param diagnosticListener a diagnostic listener; if {@code
241 * null} use the compiler's default method for reporting
242 * diagnostics
243 * @param options compiler options, {@code null} means no options
244 * @param classes names of classes to be processed by annotation
245 * processing, {@code null} means no class names
246 * @param compilationUnits the compilation units to compile, {@code
247 * null} means no compilation units
248 * @return an object representing the compilation
249 * @throws RuntimeException if an unrecoverable error
250 * occurred in a user supplied component. The
251 * {@linkplain Throwable#getCause() cause} will be the error in
252 * user code.
253 * @throws IllegalArgumentException if any of the options are invalid,
254 * or if any of the given compilation units are of other kind than
255 * {@linkplain JavaFileObject.Kind#SOURCE source}
256 */
257 CompilationTask getTask(Writer out,
258 JavaFileManager fileManager,
259 DiagnosticListener<? super JavaFileObject> diagnosticListener,
|