Modifier and Type | Field and Description |
---|---|
private String |
explanation
the full explanation text
|
private boolean |
formatExplanation
flag to format the explanation
|
private int |
level
the message level, initialized to an illegal value
|
private String |
message
the brief message text
|
private Throwable |
thrownException
optional exception associated with the message
|
Constructor and Description |
---|
Reporter.Message(int level,
String message,
String explanation)
Construct a
Message having the given level
and text. |
Reporter.Message(int level,
String message,
Throwable thrownException,
String explanation)
Construct a
Message having the given level,
text, and exception data. |
Modifier and Type | Method and Description |
---|---|
protected boolean |
formatExplanation()
Returns the flag indicating whether to format the explanation text.
|
protected String |
getExplanation()
Returns the explanation text.
|
protected int |
getLevel()
Returns the message level.
|
protected String |
getMessage()
Returns the short message text.
|
protected void |
printStackTrace()
Prints a stack trace for the exception associated with this
message.
|
protected void |
setFormatExplanation(boolean b)
Set the flag indicating whether to format the explanation text.
|
private Throwable thrownException
private String message
private String explanation
private int level
private boolean formatExplanation
public Reporter.Message(int level, String message, String explanation)
Message
having the given level
and text.level
- the message levelmessage
- the short message textexplanation
- the explanation textpublic Reporter.Message(int level, String message, Throwable thrownException, String explanation)
Message
having the given level,
text, and exception data.level
- the message levelmessage
- the short message textthrownException
- the exception associated with the messageexplanation
- the explanation textprotected int getLevel()
protected String getMessage()
null
exception
is associated with this message, the exception message is
appended to the short message.protected String getExplanation()
protected void printStackTrace()
protected void setFormatExplanation(boolean b)
b
- if true
, format the textprotected boolean formatExplanation()
true
if the text is to be formatted.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.