public class DefaultParseListener extends java.lang.Object implements ParseListener
ParseListener
.
This implementation writes messages to System.err
.
Modifier and Type | Field and Description |
---|---|
int |
level |
Constructor and Description |
---|
DefaultParseListener()
Create a default listener.
|
DefaultParseListener(int level)
Create a default listener with a particular message level.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(java.lang.String message)
Emit a debug message.
|
void |
detail(java.lang.String message)
Emit a detail message.
|
void |
error(java.lang.String message)
Emit an error message.
|
int |
getMessageLevel()
How verbose are we being?
|
void |
info(java.lang.String message)
Emit an info message.
|
void |
setMessageLevel(int level)
How verbose do you want me to be?
|
void |
warning(java.lang.String message)
Emit a warning message.
|
public DefaultParseListener()
The default listener only reports errors.
public DefaultParseListener(int level)
level
- The level.public void debug(java.lang.String message)
ParseListener
Tell me everything about the parse.
debug
in interface ParseListener
message
- The message.public void detail(java.lang.String message)
ParseListener
Tell me about the details of the parse.
detail
in interface ParseListener
message
- The message.public void info(java.lang.String message)
ParseListener
Keep me informed about the process of the parse.
info
in interface ParseListener
message
- The message.public void warning(java.lang.String message)
ParseListener
Tell if something looks fishy.
warning
in interface ParseListener
message
- The message.public void error(java.lang.String message)
ParseListener
Tell me if there's been an error of some sort.
error
in interface ParseListener
message
- The message.public int getMessageLevel()
ParseListener
This returns a level, one of the constants defined in this interface.
getMessageLevel
in interface ParseListener
public void setMessageLevel(int level)
ParseListener
Sets the message output level.
setMessageLevel
in interface ParseListener
level
- The level; should be one of the constants defined in this interface.