public class Message extends java.lang.Object implements IMessage
IMessage.Kind| Constructor and Description |
|---|
Message(java.lang.String message,
IMessage.Kind kind,
java.lang.Throwable thrown,
ISourceLocation sourceLocation)
Create a message, handling null values for message and kind if thrown is not null.
|
Message(java.lang.String message,
ISourceLocation location,
boolean isError)
Create a (compiler) error or warning message
|
Message(java.lang.String message,
ISourceLocation location,
boolean isError,
ISourceLocation[] extraSourceLocations) |
Message(java.lang.String message,
java.lang.String details,
IMessage.Kind kind,
ISourceLocation sourceLocation,
java.lang.Throwable thrown,
ISourceLocation[] extraSourceLocations)
Create a message, handling null values for message and kind if thrown is not null.
|
Message(java.lang.String message,
java.lang.String details,
IMessage.Kind kind,
ISourceLocation sLoc,
java.lang.Throwable thrown,
ISourceLocation[] otherLocs,
boolean declared,
int id,
int sourcestart,
int sourceend) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getDeclared()
Caller can verify if this message came about because of a DEOW
|
java.lang.String |
getDetails() |
java.util.List<ISourceLocation> |
getExtraSourceLocations() |
int |
getID()
Return the ID of the message where applicable, see IProblem for list of valid IDs
|
IMessage.Kind |
getKind() |
java.lang.String |
getMessage() |
int |
getSourceEnd()
Return the end position of the problem (inclusive), or -1 if unknown.
|
ISourceLocation |
getSourceLocation() |
int |
getSourceStart()
Return the start position of the problem (inclusive), or -1 if unknown.
|
java.lang.Throwable |
getThrown() |
boolean |
isAbort() |
boolean |
isDebug() |
boolean |
isError() |
boolean |
isFailed() |
boolean |
isInfo() |
boolean |
isTaskTag() |
boolean |
isWarning() |
java.lang.String |
toString() |
public Message(java.lang.String message,
ISourceLocation location,
boolean isError)
message - the String used as the underlying messagelocation - the ISourceLocation, if any, associated with this messageisError - if true, use IMessage.ERROR; else use IMessage.WARNINGpublic Message(java.lang.String message,
ISourceLocation location,
boolean isError,
ISourceLocation[] extraSourceLocations)
public Message(java.lang.String message,
java.lang.String details,
IMessage.Kind kind,
ISourceLocation sourceLocation,
java.lang.Throwable thrown,
ISourceLocation[] extraSourceLocations)
message - the String used as the underlying messagekind - the IMessage.Kind of message - not nullthrown - the Throwable, if any, associated with this messagesourceLocation - the ISourceLocation, if any, associated with this messagedetails - descriptive information about the messagejava.lang.IllegalArgumentException - if message is null and thrown is null or has a null message, or if kind is null and thrown
is null.public Message(java.lang.String message,
java.lang.String details,
IMessage.Kind kind,
ISourceLocation sLoc,
java.lang.Throwable thrown,
ISourceLocation[] otherLocs,
boolean declared,
int id,
int sourcestart,
int sourceend)
public Message(java.lang.String message,
IMessage.Kind kind,
java.lang.Throwable thrown,
ISourceLocation sourceLocation)
message - the String used as the underlying messagekind - the IMessage.Kind of message - not nullthrown - the Throwable, if any, associated with this messagesourceLocation - the ISourceLocation, if any, associated with this messagejava.lang.IllegalArgumentException - if message is null and thrown is null or has a null message, or if kind is null and thrown
is null.public IMessage.Kind getKind()
public boolean isError()
public boolean isWarning()
public boolean isDebug()
public boolean isTaskTag()
public boolean isInfo()
public boolean isAbort()
public boolean getDeclared()
getDeclared in interface IMessagepublic boolean isFailed()
public final java.lang.String getMessage()
getMessage in interface IMessagepublic final java.lang.Throwable getThrown()
public final ISourceLocation getSourceLocation()
getSourceLocation in interface IMessagepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getDetails()
getDetails in interface IMessagepublic java.util.List<ISourceLocation> getExtraSourceLocations()
getExtraSourceLocations in interface IMessageISourceLocation instances that indicate additional source locations relevent to this message as
specified by the message creator. The list should not include the primary source location associated with the message
which can be obtained from getSourceLocation().
An example of using extra locations would be in a warning message that
flags all shadow locations that will go unmatched due to a pointcut definition
being based on a subtype of a defining type.
public int getID()
IMessagepublic int getSourceStart()
IMessagegetSourceStart in interface IMessagepublic int getSourceEnd()
IMessagegetSourceEnd in interface IMessage