A base class for data structures that can collect messages and errors during processing.
Modifiers | Name | Description |
---|---|---|
protected GroovyClassLoader |
classLoader |
The ClassLoader to use during processing |
protected CompilerConfiguration |
configuration |
Configuration and other settings that control processing |
protected ErrorCollector |
errorCollector |
a helper to share errors and report them |
protected int |
phase |
The current phase |
protected boolean |
phaseComplete |
True if phase is finished |
Type | Name and description |
---|---|
GroovyClassLoader |
classLoader |
CompilerConfiguration |
configuration |
Constructor and description |
---|
ProcessingUnit
(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector errorCollector) Initializes the ProcessingUnit to the empty state. |
Type Params | Return Type | Name and description |
---|---|---|
|
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() Get the CompilerConfiguration for this ProcessingUnit. |
|
ErrorCollector |
getErrorCollector() Errors found during the compilation should be reported through the ErrorCollector. |
|
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 given phase. |
|
boolean |
isPhaseComplete() |
|
void |
nextPhase() A synonym for gotoPhase(getPhase() + 1) . |
|
void |
setClassLoader(GroovyClassLoader loader) Sets the class loader for use by this ProcessingUnit. |
|
void |
setConfiguration(CompilerConfiguration configuration) Sets the CompilerConfiguration for this ProcessingUnit. |
The ClassLoader to use during processing
Configuration and other settings that control processing
a helper to share errors and report them
The current phase
True if phase is finished
Initializes the ProcessingUnit to the empty state.
Marks the current phase complete and processes any errors.
Reconfigures the ProcessingUnit.
Returns the class loader in use by this ProcessingUnit.
Get the CompilerConfiguration for this ProcessingUnit.
Errors found during the compilation should be reported through the ErrorCollector.
Returns the current phase.
Returns the description for the current phase.
Wraps up any pending operations for the current phase and switches to the given phase.
A synonym for gotoPhase(getPhase() + 1)
.
Sets the class loader for use by this ProcessingUnit.
Sets the CompilerConfiguration for this ProcessingUnit.
Copyright © 2003-2021 The Apache Software Foundation. All rights reserved.