|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Writer
java.io.PrintWriter
tribble.io.SuspendablePrintWriter
tribble.io.DiagnosticOutputDfl
public class DiagnosticOutputDfl
Diagnostic message (informational, warning, and error messages) output stream.
This is a default implementation of a diagnostic message output stream (see
DiagnosticOutputI) that is capable of writing diagnostic
messages as lines of text to an underlying output stream. Such a stream is
used to display informational, warning, and error diagnostic messages by such
classes as lexical analyzers (lexers) and parsers.
See the printMessage(java.lang.String, int, java.lang.String) method.
DiagnosticOutputI| Field Summary | |
|---|---|
protected java.lang.StringBuffer |
m_buf
Output message buffer. |
(package private) static java.lang.String |
REV
Revision information. |
| Fields inherited from class tribble.io.SuspendablePrintWriter |
|---|
m_err, m_sus |
| Fields inherited from class java.io.PrintWriter |
|---|
out |
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
DiagnosticOutputDfl(java.io.OutputStream out)
Constructor. |
|
DiagnosticOutputDfl(java.io.Writer out)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
finalize()
Finalization. |
void |
printMessage(java.lang.String fname,
int line,
java.lang.String msg)
Writes a diagnostic message to the output stream. |
| Methods inherited from class tribble.io.SuspendablePrintWriter |
|---|
checkError, clearError, close, flush, getOutput, isSuspended, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, resume, setOutput, suspend, write, write, write, write, write |
| Methods inherited from class java.io.PrintWriter |
|---|
append, append, append, format, format, printf, printf, setError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final java.lang.String REV
protected java.lang.StringBuffer m_buf
| Constructor Detail |
|---|
public DiagnosticOutputDfl(java.io.Writer out)
out - An output stream to which diagnostic messages (warning and error messages)
are written. This should not be null.public DiagnosticOutputDfl(java.io.OutputStream out)
out - An output stream to which diagnostic messages (warning and error messages)
are written. This should not be null.| Method Detail |
|---|
public void printMessage(java.lang.String fname,
int line,
java.lang.String msg)
printMessage in interface DiagnosticOutputIfname - An optional source filename for the diagnostic message.
If it is not null and not empty, it and a colon (":")
immediately following it are written.line - An optional source line number for the diagnostic message.
If it is not zero, it and a colon (":") immediately following it
are written.msg - The message text.
This typically contains a prefix indicating the severity of the message,
such as "warning:" or "error:".
Note that the message should not contain a terminating linefeed.
protected void finalize()
throws java.lang.Throwable
finalize in class SuspendablePrintWriterjava.lang.Throwable - Thrown if an error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||