public class LoggableOp
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
_verbose
If true, then print extra information in the error output.
|
Constructor and Description |
---|
LoggableOp() |
Modifier and Type | Method and Description |
---|---|
int |
getErrorCount()
Get the number of errors generated during the most
recent operation.
|
java.io.PrintStream |
getErrorStream()
Get the stream to which errors are printed.
|
int |
getLineNumber()
Get the current line number.
|
int |
getWarningCount()
Get the number of warnings generated during the most
recent parse.
|
void |
indent()
Increment the indentation counter.
|
boolean |
isVerbose()
Test if we are in verbose mode.
|
void |
logError(java.lang.String msg)
Print an error message to the error stream.
|
void |
logError(java.lang.String id,
java.lang.String msg)
Print an error message to the error stream.
|
void |
logError(java.lang.String id,
java.lang.String msg,
java.lang.String detail)
Print an error message to the error stream.
|
void |
logInfo(java.lang.String msg)
If in verbose mode, print an info message to the error stream,
otherwise do nothing.
|
void |
logInfo(java.lang.String id,
java.lang.String msg)
If in verbose mode, print an info message to the error stream,
otherwise do nothing.
|
void |
logWarning(java.lang.String msg)
Print an warning message to the error stream.
|
void |
logWarning(java.lang.String id,
java.lang.String msg)
Print an warning message to the error stream.
|
void |
logWarning(java.lang.String id,
java.lang.String msg,
java.lang.String detail)
Print an warning message to the error stream.
|
void |
reset()
Reset the error counters.
|
void |
setErrorStream(java.io.PrintStream err)
Set the stream to which errors are printed.
|
void |
setVerbose(boolean v)
Set the verbose mode flag.
|
void |
unindent()
Decrement the indentation counter.
|
protected boolean _verbose
public int getErrorCount()
public java.io.PrintStream getErrorStream()
setErrorStream(PrintStream)
public int getWarningCount()
public int getLineNumber()
public void logError(java.lang.String msg)
msg
- The messagepublic void logError(java.lang.String id, java.lang.String msg)
id
- The error idmsg
- The info messagepublic void logError(java.lang.String id, java.lang.String msg, java.lang.String detail)
id
- The error idmsg
- The infor messagedetail
- The detail informationpublic void logInfo(java.lang.String msg)
msg
- The info messagepublic void logInfo(java.lang.String id, java.lang.String msg)
id
- The error idmsg
- The info messagepublic void indent()
public final boolean isVerbose()
setVerbose(boolean)
public void reset()
public void setErrorStream(java.io.PrintStream err)
err
- The streamgetErrorStream()
public void setVerbose(boolean v)
v
- True if we are in verbose mode.isVerbose()
public void unindent()
public void logWarning(java.lang.String msg)
msg
- The warning messagepublic void logWarning(java.lang.String id, java.lang.String msg)
id
- The warning idmsg
- The warning messagepublic void logWarning(java.lang.String id, java.lang.String msg, java.lang.String detail)
id
- The warning idmsg
- The warning messagedetail
- The detail message