public class MibLoaderLog
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
MibLoaderLog.LogEntry
A log entry.
|
Constructor and Description |
---|
MibLoaderLog()
Creates a new loader log without entries.
|
Modifier and Type | Method and Description |
---|---|
void |
add(MibLoaderLog.LogEntry entry)
Adds a log entry to this log.
|
void |
addAll(MibLoaderLog log)
Adds all log entries from another log.
|
void |
addError(java.io.File file,
int line,
int column,
java.lang.String message)
Adds an error message to the log.
|
void |
addError(FileLocation location,
java.lang.String message)
Adds an error message to the log.
|
void |
addInternalError(FileLocation location,
java.lang.String message)
Adds an internal error message to the log.
|
void |
addInternalError(java.io.File file,
java.lang.String message)
Adds an internal error message to the log.
|
void |
addWarning(java.io.File file,
int line,
int column,
java.lang.String message)
Adds a warning message to the log.
|
void |
addWarning(FileLocation location,
java.lang.String message)
Adds a warning message to the log.
|
java.util.Iterator |
entries()
Returns an iterator with all the log entries.
|
int |
errorCount()
Returns the number of errors in the log.
|
void |
printTo(java.io.PrintStream output)
Prints all log entries to the specified output stream.
|
void |
printTo(java.io.PrintWriter output)
Prints all log entries to the specified output stream.
|
void |
printTo(java.io.PrintWriter output,
int margin)
Prints all log entries to the specified output stream.
|
int |
warningCount()
Returns the number of warnings in the log.
|
public int errorCount()
public int warningCount()
public void add(MibLoaderLog.LogEntry entry)
entry
- the log entry to addpublic void addInternalError(FileLocation location, java.lang.String message)
location
- the file locationmessage
- the error messagepublic void addInternalError(java.io.File file, java.lang.String message)
file
- the file affectedmessage
- the error messagepublic void addError(FileLocation location, java.lang.String message)
location
- the file locationmessage
- the error messagepublic void addError(java.io.File file, int line, int column, java.lang.String message)
file
- the file affectedline
- the line numbercolumn
- the column numbermessage
- the error messagepublic void addWarning(FileLocation location, java.lang.String message)
location
- the file locationmessage
- the warning messagepublic void addWarning(java.io.File file, int line, int column, java.lang.String message)
file
- the file affectedline
- the line numbercolumn
- the column numbermessage
- the warning messagepublic void addAll(MibLoaderLog log)
log
- the MIB loader logpublic java.util.Iterator entries()
MibLoaderLog.LogEntry
public void printTo(java.io.PrintStream output)
output
- the output stream to usepublic void printTo(java.io.PrintWriter output)
output
- the output stream to usepublic void printTo(java.io.PrintWriter output, int margin)
output
- the output stream to usemargin
- the print margin