|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.control.ProcessingUnit
public abstract class ProcessingUnit
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()
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int phase
protected boolean phaseComplete
protected CompilerConfiguration configuration
protected GroovyClassLoader classLoader
protected ErrorCollector errorCollector
Constructor Detail |
---|
public ProcessingUnit(CompilerConfiguration configuration, GroovyClassLoader classLoader, ErrorCollector er)
Method Detail |
---|
public void configure(CompilerConfiguration configuration)
public CompilerConfiguration getConfiguration()
public void setConfiguration(CompilerConfiguration configuration)
public GroovyClassLoader getClassLoader()
public void setClassLoader(GroovyClassLoader loader)
public int getPhase()
public String getPhaseDescription()
public ErrorCollector getErrorCollector()
public void completePhase() throws CompilationFailedException
CompilationFailedException
public void nextPhase() throws CompilationFailedException
gotoPhase( phase + 1 )
.
CompilationFailedException
public void gotoPhase(int phase) throws CompilationFailedException
CompilationFailedException
|
Copyright © 2003-2009 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |