On this page
[Java] Class ProcessingUnit
- org.codehaus.groovy.control.ProcessingUnit
public abstract class ProcessingUnit
extends Object
A base class for data structures that can collect messages and errors during processing.
Field Summary
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 |
Constructor Summary
Constructor and description |
---|
ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector errorCollector) Initializes the ProcessingUnit to the empty state. |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public void |
completePhase() Marks the current phase complete and processes any errors. |
|
public void |
configure(CompilerConfiguration configuration) Reconfigures the ProcessingUnit. |
|
public GroovyClassLoader |
getClassLoader() Returns the class loader in use by this ProcessingUnit. |
|
public CompilerConfiguration |
getConfiguration() Gets the CompilerConfiguration for this ProcessingUnit. |
|
public ErrorCollector |
getErrorCollector() Errors found during the compilation should be reported through the ErrorCollector. |
|
public int |
getPhase() Returns the current phase. |
|
public String |
getPhaseDescription() Returns the description for the current phase. |
|
public void |
gotoPhase(int phase) Wraps up any pending operations for the current phase and switches to the given phase. |
|
public boolean |
isPhaseComplete() |
|
public void |
nextPhase() A synonym for gotoPhase(getPhase() + 1) . |
|
public void |
setClassLoader(GroovyClassLoader loader) Sets the class loader for use by this ProcessingUnit. |
|
public final void |
setConfiguration(CompilerConfiguration configuration) Sets the CompilerConfiguration for this ProcessingUnit. |
Inherited Methods Summary
Field Detail
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
Constructor Detail
public ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector errorCollector)
Initializes the ProcessingUnit to the empty state.
Method Detail
public void completePhase()
Marks the current phase complete and processes any errors.
public void configure(CompilerConfiguration configuration)
Reconfigures the ProcessingUnit.
public GroovyClassLoader getClassLoader()
Returns the class loader in use by this ProcessingUnit.
public CompilerConfiguration getConfiguration()
Gets the CompilerConfiguration for this ProcessingUnit.
public ErrorCollector getErrorCollector()
Errors found during the compilation should be reported through the ErrorCollector.
public int getPhase()
Returns the current phase.
public String getPhaseDescription()
Returns the description for the current phase.
public void gotoPhase(int phase)
Wraps up any pending operations for the current phase and switches to the given phase.
public boolean isPhaseComplete()
public void nextPhase()
A synonym for gotoPhase(getPhase() + 1)
.
public void setClassLoader(GroovyClassLoader loader)
Sets the class loader for use by this ProcessingUnit.
public final void setConfiguration(CompilerConfiguration configuration)
Sets the CompilerConfiguration for this ProcessingUnit.
© 2003-2022 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/4.0.0/html/gapi/org/codehaus/groovy/control/ProcessingUnit.html