polyglot.util
Class AbstractErrorQueue
java.lang.Object
polyglot.util.AbstractErrorQueue
- All Implemented Interfaces:
- ErrorQueue
- Direct Known Subclasses:
- SilentErrorQueue, StdErrorQueue
public abstract class AbstractErrorQueue
- extends java.lang.Object
- implements ErrorQueue
A StdErrorQueue
handles outputing error messages.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
flushed
protected boolean flushed
errorCount
protected int errorCount
limit
protected final int limit
name
protected final java.lang.String name
AbstractErrorQueue
public AbstractErrorQueue(int limit,
java.lang.String name)
enqueue
public final void enqueue(int type,
java.lang.String message)
- Specified by:
enqueue
in interface ErrorQueue
enqueue
public final void enqueue(int type,
java.lang.String message,
Position position)
- Specified by:
enqueue
in interface ErrorQueue
enqueue
public final void enqueue(ErrorInfo e)
- Specified by:
enqueue
in interface ErrorQueue
displayError
protected abstract void displayError(ErrorInfo error)
tooManyErrors
protected void tooManyErrors(ErrorInfo lastError)
- This method is called when we have had too many errors. This method
give subclasses the opportunity to output appropriate messages, or
tidy up.
- Parameters:
lastError
- the last error that pushed us over the limit
flush
public void flush()
- This method is called to flush the error queue. Subclasses may want to
print summary information in this method.
- Specified by:
flush
in interface ErrorQueue
hasErrors
public final boolean hasErrors()
- Specified by:
hasErrors
in interface ErrorQueue
errorCount
public final int errorCount()
- Specified by:
errorCount
in interface ErrorQueue