org.codehaus.groovy.control
Class ProcessingUnit

A base class for data structures that can collect messages and errors during processing.

author:
Chris Poirier
version:
$Id: ProcessingUnit.java 10601 2008-01-25 01:11:39Z blackdrag $

Field Summary
 GroovyClassLoader classLoader
           
 CompilerConfiguration configuration
           
 ErrorCollector errorCollector
           
 int phase
           
 boolean phaseComplete
           
 
Constructor Summary
ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector er)
            The current phase
 
Method Summary
void completePhase()
           Marks the current phase complete and processes any errors.
void configure(CompilerConfiguration configuration)
           Reconfigures the ProcessingUnit.
GroovyClassLoader getClassLoader()
           Returns the class loader in use by this ProcessingUnit.
CompilerConfiguration getConfiguration()
          
ErrorCollector getErrorCollector()
          
int getPhase()
           Returns the current phase.
String getPhaseDescription()
           Returns the description for the current phase.
void gotoPhase(int phase)
           Wraps up any pending operations for the current phase and switches to the next phase.
void nextPhase()
           A synonym for gotoPhase( phase + 1 ).
void setClassLoader(GroovyClassLoader loader)
           Sets the class loader for use by this ProcessingUnit.
void setConfiguration(CompilerConfiguration configuration)
          
 

Constructor Detail

ProcessingUnit

public ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector er)
The current phase


Method Detail

completePhase

public void completePhase()
Marks the current phase complete and processes any errors.


configure

public void configure(CompilerConfiguration configuration)
Reconfigures the ProcessingUnit.


getClassLoader

public GroovyClassLoader getClassLoader()
Returns the class loader in use by this ProcessingUnit.


getConfiguration

public CompilerConfiguration getConfiguration()


getErrorCollector

public ErrorCollector getErrorCollector()


getPhase

public int getPhase()
Returns the current phase.


getPhaseDescription

public String getPhaseDescription()
Returns the description for the current phase.


gotoPhase

public void gotoPhase(int phase)
Wraps up any pending operations for the current phase and switches to the next phase.


nextPhase

public void nextPhase()
A synonym for gotoPhase( phase + 1 ).


setClassLoader

public void setClassLoader(GroovyClassLoader loader)
Sets the class loader for use by this ProcessingUnit.


setConfiguration

public void setConfiguration(CompilerConfiguration configuration)