Spec-Zone .ru
спецификации, руководства, описания, API
Please note that the specifications and other information contained herein are not final and are subject to change. The information is being made available to you solely for purpose of evaluation.

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

javax.tools
Interface JavaCompiler.CompilationTask

All Superinterfaces:
Callable<Boolean>
Enclosing interface:
JavaCompiler

public static interface JavaCompiler.CompilationTask
extends Callable<Boolean>

Interface representing a future for a compilation task. The compilation task has not yet started. To start the task, call the call method.

Before calling the call method, additional aspects of the task can be configured, for example, by calling the setProcessors method.


Method Summary
Modifier and Type Method and Description
 Boolean call()
          Performs this compilation task.
 void setLocale(Locale locale)
          Set the locale to be applied when formatting diagnostics and other localized data.
 void setProcessors(Iterable<? extends Processor> processors)
          Sets processors (for annotation processing).
 

Method Detail

setProcessors

void setProcessors(Iterable<? extends Processor> processors)
Sets processors (for annotation processing). This will bypass the normal discovery mechanism.

Parameters:
processors - processors (for annotation processing)
Throws:
IllegalStateException - if the task has started

setLocale

void setLocale(Locale locale)
Set the locale to be applied when formatting diagnostics and other localized data.

Parameters:
locale - the locale to apply; null means apply no locale
Throws:
IllegalStateException - if the task has started

call

Boolean call()
Performs this compilation task. The compilation may only be performed once. Subsequent calls to this method throw IllegalStateException.

Specified by:
call in interface Callable<Boolean>
Returns:
true if and only all the files compiled without errors; false otherwise
Throws:
RuntimeException - if an unrecoverable error occurred in a user-supplied component. The cause will be the error in user code.
IllegalStateException - if called more than once

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 1993, 2010, Oracle Corporation. All rights reserved.
DRAFT ea-b118

Scripting on this page tracks web page traffic, but does not change the content in any way.