Collects all compilation data as it is generated by the compiler system.
Allows additional source units to be added and compilation run again (to
affect only the deltas).
author: Chris Poirier author: Jochen Theodorou version: $Id: CompilationUnit.java 4661 2007-01-02 16:52:26Z blackdrag $
Inner Class :abstractpublic static class ClassgenCallback
Inner Class :abstractpublic static class ProgressCallback
Inner Class :abstractpublic static class SourceUnitOperation
Inner Class :abstractpublic static class PrimaryClassNodeOperation
Inner Class :abstractpublic static class GroovyClassOperation
Adds a ClassNode directly to the unit (ie. without source).
WARNING: the source is needed for error reporting, using
this method without setting a SourceUnit will cause
NullPinterExceptions
addPhaseOperation
public void addPhaseOperation(SourceUnitOperation op, int phase)(Code)
addPhaseOperation
public void addPhaseOperation(PrimaryClassNodeOperation op, int phase)(Code)
addPhaseOperation
public void addPhaseOperation(GroovyClassOperation op)(Code)
A loop driver for applying operations to all primary ClassNodes in
our AST. Automatically skips units that have already been processed
through the current phase.
Configures its debugging mode and classloader classpath from a given compiler configuration.
This cannot be done more than once due to limitations in
java.net.URLClassLoader URLClassLoader .
Dequeues any source units add through addSource and resets the compiler phase
to initialization.
Note: this does not mean a file is recompiled. If a SoucreUnit has already passed
a phase it is skipped until a higher phase is reached.
TODO throws: CompilationFailedException -