public abstract class AbstractErrorQueue extends java.lang.Object implements ErrorQueue
StdErrorQueue
handles outputting error messages.Modifier and Type | Field and Description |
---|---|
protected int |
errorCount |
protected boolean |
flushed |
protected int |
limit |
protected java.lang.String |
name |
Constructor and Description |
---|
AbstractErrorQueue(int limit,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
displayError(ErrorInfo error) |
void |
enqueue(ErrorInfo e) |
void |
enqueue(int type,
java.lang.String message) |
void |
enqueue(int type,
java.lang.String message,
Position position) |
int |
errorCount() |
void |
flush()
This method is called to flush the error queue.
|
boolean |
hasErrors() |
protected void |
tooManyErrors(ErrorInfo lastError)
This method is called when we have had too many errors.
|
protected boolean flushed
protected int errorCount
protected final int limit
protected final java.lang.String name
public final void enqueue(int type, java.lang.String message)
enqueue
in interface ErrorQueue
public final void enqueue(int type, java.lang.String message, Position position)
enqueue
in interface ErrorQueue
public final void enqueue(ErrorInfo e)
enqueue
in interface ErrorQueue
protected abstract void displayError(ErrorInfo error)
protected void tooManyErrors(ErrorInfo lastError)
lastError
- the last error that pushed us over the limitpublic void flush()
flush
in interface ErrorQueue
public final boolean hasErrors()
hasErrors
in interface ErrorQueue
public final int errorCount()
errorCount
in interface ErrorQueue