|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object 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 | |
---|---|
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
Set true if phase is finished |
Constructor Summary | |
ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector er)
Initialize the ProcessingUnit to the empty state. |
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()
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 next phase. |
void
|
nextPhase()
A synonym for |
void
|
setClassLoader(GroovyClassLoader loader)
Sets the class loader for use by this ProcessingUnit. |
void
|
setConfiguration(CompilerConfiguration configuration)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
protected GroovyClassLoader classLoader
protected CompilerConfiguration configuration
protected ErrorCollector errorCollector
protected int phase
protected boolean phaseComplete
Constructor Detail |
---|
public ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector er)
Method Detail |
---|
public void completePhase()
public void configure(CompilerConfiguration configuration)
public GroovyClassLoader getClassLoader()
public CompilerConfiguration getConfiguration()
public ErrorCollector getErrorCollector()
public int getPhase()
public String getPhaseDescription()
public void gotoPhase(int phase)
public void nextPhase()
gotoPhase( phase + 1 )
.
public void setClassLoader(GroovyClassLoader loader)
public void setConfiguration(CompilerConfiguration configuration)
Copyright © 2003-2013 The Codehaus. All rights reserved.