public final class Message extends java.lang.Object implements Element
addError()
statements:
try { bindPropertiesFromFile(); } catch (IOException e) { addError(e); }
Constructor and Description |
---|
Message(java.util.List<java.lang.Object> sources,
java.lang.String message,
java.lang.Throwable cause) |
Message(java.lang.Object source,
java.lang.String message) |
Message(java.lang.Object source,
java.lang.Throwable cause) |
Message(java.lang.String message) |
Modifier and Type | Method and Description |
---|---|
<T> T |
acceptVisitor(ElementVisitor<T> visitor)
Accepts an element visitor.
|
void |
applyTo(Binder binder)
Writes this module element to the given binder (optional operation).
|
boolean |
equals(java.lang.Object o) |
java.lang.Throwable |
getCause()
Returns the throwable that caused this message, or
null if this
message was not caused by a throwable. |
java.lang.String |
getMessage()
Gets the error message text.
|
java.lang.String |
getSource()
Returns an arbitrary object containing information about the "place" where this element was
configured.
|
java.util.List<java.lang.Object> |
getSources() |
int |
hashCode() |
java.lang.String |
toString() |
public Message(java.util.List<java.lang.Object> sources, java.lang.String message, java.lang.Throwable cause)
public Message(java.lang.Object source, java.lang.String message)
public Message(java.lang.Object source, java.lang.Throwable cause)
public Message(java.lang.String message)
public java.lang.String getSource()
Element
Tools might specially handle types they know about; StackTraceElement
is a good
example. Tools should simply call toString()
on the source object if the type is
unfamiliar.
public java.util.List<java.lang.Object> getSources()
public java.lang.String getMessage()
public <T> T acceptVisitor(ElementVisitor<T> visitor)
Element
acceptVisitor
in interface Element
visitor
- to call back onpublic java.lang.Throwable getCause()
null
if this
message was not caused by a throwable.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object