org.aspectj.bridge
Interface IMessage

All Known Implementing Classes:
LintMessage, Message, WeaveMessage

public interface IMessage

Wrap message with any associated throwable or source location.


Nested Class Summary
static class IMessage.Kind
           
 
Field Summary
static IMessage.Kind ABORT
           
static IMessage.Kind DEBUG
           
static IMessage.Kind ERROR
           
static IMessage.Kind FAIL
           
static IMessage.Kind INFO
           
static java.util.List<IMessage.Kind> KINDS
          list of Kind in precedence order.
static IMessage[] RA_IMessage
          no messages
static IMessage.Kind TASKTAG
           
static IMessage.Kind WARNING
           
static IMessage.Kind WEAVEINFO
           
 
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()
           
 

Field Detail

RA_IMessage

static final IMessage[] RA_IMessage
no messages


WEAVEINFO

static final IMessage.Kind WEAVEINFO

INFO

static final IMessage.Kind INFO

DEBUG

static final IMessage.Kind DEBUG

TASKTAG

static final IMessage.Kind TASKTAG

WARNING

static final IMessage.Kind WARNING

ERROR

static final IMessage.Kind ERROR

FAIL

static final IMessage.Kind FAIL

ABORT

static final IMessage.Kind ABORT

KINDS

static final java.util.List<IMessage.Kind> KINDS
list of Kind in precedence order. 0 is less than IMessage.Kind.COMPARATOR.compareTo(KINDS.get(i), KINDS.get(i + 1))

Method Detail

getMessage

java.lang.String getMessage()
Returns:
non-null String with simple message

getKind

IMessage.Kind getKind()
Returns:
the kind of this message

isError

boolean isError()
Returns:
true if this is an error

isWarning

boolean isWarning()
Returns:
true if this is a warning

isDebug

boolean isDebug()
Returns:
true if this is an internal debug message

isInfo

boolean isInfo()
Returns:
true if this is information for the user

isAbort

boolean isAbort()
Returns:
true if the process is aborting

isTaskTag

boolean isTaskTag()
Returns:
true if this is a task tag message

isFailed

boolean isFailed()
Returns:
true if something failed

getDeclared

boolean getDeclared()
Caller can verify if this message came about because of a DEOW


getID

int getID()
Return the ID of the message where applicable, see IProblem for list of valid IDs


getSourceStart

int getSourceStart()
Return the start position of the problem (inclusive), or -1 if unknown.


getSourceEnd

int getSourceEnd()
Return the end position of the problem (inclusive), or -1 if unknown.


getThrown

java.lang.Throwable getThrown()
Returns:
Throwable associated with this message, or null if none

getSourceLocation

ISourceLocation getSourceLocation()
Returns:
source location associated with this message, or null if none

getDetails

java.lang.String getDetails()
Returns:
Detailed information about the message. For example, for declare error/warning messages this returns information about the corresponding join point's static part.

getExtraSourceLocations

java.util.List<ISourceLocation> getExtraSourceLocations()
Returns:
List of ISourceLocation 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