|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.codehaus.groovy.GroovyException
org.codehaus.groovy.tools.ExceptionCollector
Provides a collector for Groovy compilation exceptions that throws itself when the volume of compilation errors pass a specified threshold. The threshold is met when either a single fatal exception or some configured maximum of non-fatal exceptions make it into the set.
Created by org.codehaus.groovy.tools.Compiler, and filled by the lexer, parser, and code generation subsystems.
Constructor Summary | |
ExceptionCollector()
Initializes the exception set so that all exceptions are considered fatal. |
|
ExceptionCollector(int limit)
Initializes the exception set so that some number of non-fatal exceptions triggers fatality. |
|
ExceptionCollector(java.lang.String message,
int limit)
Initializes the exception set so that some number of non-fatal exceptions triggers fatality. |
Method Summary | |
void |
add(GroovyException exception)
Adds a GroovyException to the collector. |
void |
add(GroovyException exception,
boolean withThrow)
Adds a GroovyException to the collector. |
GroovyException |
get(int child)
Returns the Exception at the specified offset. |
java.lang.String |
getMessage()
Returns a string summary of the exception set. |
boolean |
hasCause()
Returns true if throwIfCause() should throw. |
boolean |
isEmpty()
Returns true if the collector is empty. |
boolean |
isFull()
Returns true if the set has reached its limit. |
java.util.Iterator |
iterator()
Returns an Iterator to the exceptions in the set. |
void |
merge(ExceptionCollector other)
Merges in data from another collector. |
void |
merge(ExceptionCollector other,
boolean withThrow)
Merges in data from another collector. |
int |
size()
Returns the number of exceptions in the set. |
void |
throwFirstChild()
Throws the first exception. |
void |
throwIfCause()
Throws this collector if there is sufficient cause. |
void |
throwUnlessEmpty()
Throws this collector if it isn't empty. |
java.lang.String |
toString()
Returns a string representation of the exception set. |
Methods inherited from class org.codehaus.groovy.GroovyException |
isFatal, setFatal |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ExceptionCollector()
public ExceptionCollector(int limit)
public ExceptionCollector(java.lang.String message, int limit)
Method Detail |
public void add(GroovyException exception) throws ExceptionCollector
GroovyException
to the collector. Throws the
collector if hasCause()
.
ExceptionCollector
public void add(GroovyException exception, boolean withThrow) throws ExceptionCollector
GroovyException
to the collector. Throws the
collector if hasCause()
and withThrow
.
ExceptionCollector
public void merge(ExceptionCollector other) throws ExceptionCollector
hasCause()
.
ExceptionCollector
public void merge(ExceptionCollector other, boolean withThrow) throws ExceptionCollector
hasCause()
and withThrow
.
ExceptionCollector
public void throwIfCause() throws ExceptionCollector
ExceptionCollector
public void throwUnlessEmpty() throws ExceptionCollector
ExceptionCollector
public boolean isEmpty()
public boolean isFull()
public boolean hasCause()
throwIfCause()
should throw.
public int size()
public GroovyException get(int child)
public void throwFirstChild() throws GroovyException
GroovyException
public java.util.Iterator iterator()
Iterator
to the exceptions in the set.
public java.lang.String getMessage()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |