|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.bridge.Message
public class Message
Implement messages. This implementation is immutable if ISourceLocation is immutable.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.aspectj.bridge.IMessage |
|---|
IMessage.Kind |
| Field Summary |
|---|
| Fields inherited from interface org.aspectj.bridge.IMessage |
|---|
ABORT, DEBUG, ERROR, FAIL, INFO, KINDS, RA_IMessage, TASKTAG, WARNING, WEAVEINFO |
| Constructor Summary | |
|---|---|
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)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
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.WARNING
public 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 message
java.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 message
java.lang.IllegalArgumentException - if message is null and thrown is null or has a null message, or if kind is null and thrown
is null.| Method Detail |
|---|
public IMessage.Kind getKind()
getKind in interface IMessagepublic boolean isError()
isError in interface IMessagepublic boolean isWarning()
isWarning in interface IMessagepublic boolean isDebug()
isDebug in interface IMessagepublic boolean isTaskTag()
isTaskTag in interface IMessagepublic boolean isInfo()
isInfo in interface IMessagepublic boolean isAbort()
isAbort in interface IMessagepublic boolean getDeclared()
getDeclared in interface IMessagepublic boolean isFailed()
isFailed in interface IMessagepublic final java.lang.String getMessage()
getMessage in interface IMessagepublic final java.lang.Throwable getThrown()
getThrown in interface IMessagepublic 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.
- See Also:
- AspectJ bug 41952
public int getID()
IMessage
getID in interface IMessagepublic int getSourceStart()
IMessage
getSourceStart in interface IMessagepublic int getSourceEnd()
IMessage
getSourceEnd in interface IMessage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||