public class Message
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Message(java.lang.Object source,
java.lang.String text,
Severity severity)
Creates a new message.
|
Modifier and Type | Method and Description |
---|---|
Severity |
getSeverity()
The severity of this message.
|
java.lang.Object |
getSource()
A reference to the source element this message is associated with.
|
java.lang.String |
getText()
The message text.
|
boolean |
hasField()
Whether the message is associated with a field.
|
java.lang.String |
toString() |
public Message(java.lang.Object source, java.lang.String text, Severity severity)
source
- the source of the messagetext
- the message textseverity
- the message severitypublic java.lang.Object getSource()
public java.lang.String getText()
public Severity getSeverity()
public boolean hasField()
true
if the source is a String that has text; false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object