-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b136
-
generic
-
generic
-
Verified
Using JSR 199, you can get a JavaCompiler object, from which you can get CompilationTask objects to perform compilations.
Using the Tree API, you can cast a CompilationTask to a JavacTask, to get more control over the compilation, such as calling parse(), analyse() and generate() separately or not at all.
But starting a CompilationTask establishes a lock on the JavaCompiler object, which prevents further CompilationTask objects from being created until the first compilation is completed. This lock is an issue if the desire is to just use the Tree API to parse and/or analyze files without generating code.
Using the Tree API, you can cast a CompilationTask to a JavacTask, to get more control over the compilation, such as calling parse(), analyse() and generate() separately or not at all.
But starting a CompilationTask establishes a lock on the JavaCompiler object, which prevents further CompilationTask objects from being created until the first compilation is completed. This lock is an issue if the desire is to just use the Tree API to parse and/or analyze files without generating code.