Top Description Inners Fields Methods
org.aspectj.bridge

public Interface IMessage

Known Direct Implementers
org.aspectj.bridge.Message, org.aspectj.bridge.context.PinpointingMessageHandler.PinpointedMessage
Imports
java.util.Arrays, .Collections, .Comparator, .List

Wrap message with any associated throwable or source location.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final IMessage.Kind
public static final IMessage.Kind
public static final IMessage.Kind
public static final IMessage.Kind
public static final IMessage.Kind
public static final List<IMessage.Kind>
KINDS

list of Kind in precedence order.

public static final IMessage[]
RA_IMessage

no messages

public static final IMessage.Kind
public static final IMessage.Kind
public static final IMessage.Kind
public static final IMessage.Kind

Method Summary

Modifier and TypeMethod and Description
public boolean
getDeclared()

Caller can verify if this message came about because of a DEOW

public String

Returns:

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

public List<ISourceLocation>

Returns:

a list of additional source locations
getExtraSourceLocations
()

Return a List of ISourceLocation instances that indicate additional source locations relevent to this message as specified by the message creator.

public int
getID()

Return the ID of the message where applicable, see IProblem for list of valid IDs

public IMessage.Kind

Returns:

the kind of this message
getKind
()

public String

Returns:

non-null String with simple message
getMessage
()

public int
getSourceEnd()

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

public ISourceLocation

Returns:

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

public int
getSourceStart()

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

public Throwable

Returns:

Throwable associated with this message, or null if none
getThrown
()

public boolean

Returns:

true if the process is aborting
isAbort
()

public boolean

Returns:

true if this is an internal debug message
isDebug
()

public boolean

Returns:

true if this is an error
isError
()

public boolean

Returns:

true if something failed
isFailed
()

public boolean

Returns:

true if this is information for the user
isInfo
()

public boolean

Returns:

true if this is a task tag message
isTaskTag
()

public boolean

Returns:

true if this is a compiler usage message
isUsage
()

public boolean

Returns:

true if this is a warning
isWarning
()

Field Detail

ABORTback to summary
public static final IMessage.Kind ABORT
DEBUGback to summary
public static final IMessage.Kind DEBUG
ERRORback to summary
public static final IMessage.Kind ERROR
FAILback to summary
public static final IMessage.Kind FAIL
INFOback to summary
public static final IMessage.Kind INFO
KINDSback to summary
public static final 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))

RA_IMessageback to summary
public static final IMessage[] RA_IMessage

no messages

TASKTAGback to summary
public static final IMessage.Kind TASKTAG
USAGEback to summary
public static final IMessage.Kind USAGE
WARNINGback to summary
public static final IMessage.Kind WARNING
WEAVEINFOback to summary
public static final IMessage.Kind WEAVEINFO

Method Detail

getDeclaredback to summary
public boolean getDeclared()

Caller can verify if this message came about because of a DEOW

getDetailsback to summary
public String getDetails()
Returns:String

Detailed information about the message. For example, for declare error/warning messages this returns information about the corresponding join point's static part.

getExtraSourceLocationsback to summary
public List<ISourceLocation> getExtraSourceLocations()

Return a 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.

Returns:List<ISourceLocation>

a list of additional source locations

See Also
AspectJ bug 41952
getIDback to summary
public int getID()

Return the ID of the message where applicable, see IProblem for list of valid IDs

getKindback to summary
public IMessage.Kind getKind()
Returns:IMessage.Kind

the kind of this message

getMessageback to summary
public String getMessage()
Returns:String

non-null String with simple message

getSourceEndback to summary
public int getSourceEnd()

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

getSourceLocationback to summary
public ISourceLocation getSourceLocation()
Returns:ISourceLocation

source location associated with this message, or null if none

getSourceStartback to summary
public int getSourceStart()

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

getThrownback to summary
public Throwable getThrown()
Returns:Throwable

Throwable associated with this message, or null if none

isAbortback to summary
public boolean isAbort()
Returns:boolean

true if the process is aborting

isDebugback to summary
public boolean isDebug()
Returns:boolean

true if this is an internal debug message

isErrorback to summary
public boolean isError()
Returns:boolean

true if this is an error

isFailedback to summary
public boolean isFailed()
Returns:boolean

true if something failed

isInfoback to summary
public boolean isInfo()
Returns:boolean

true if this is information for the user

isTaskTagback to summary
public boolean isTaskTag()
Returns:boolean

true if this is a task tag message

isUsageback to summary
public boolean isUsage()
Returns:boolean

true if this is a compiler usage message

isWarningback to summary
public boolean isWarning()
Returns:boolean

true if this is a warning

org.aspectj.bridge back to summary

public final Class IMessage.Kind

extends Object
implements Comparable<IMessage.Kind>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable

Field Summary

Modifier and TypeField and Description
public static final Comparator<IMessage.Kind>
private final String
private final int

Constructor Summary

AccessConstructor and Description
private
Kind(String name, int precedence)

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(IMessage.Kind
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
public boolean

Returns:

false if kind is null or this has less precedence than kind, true otherwise.
isSameOrLessThan
(IMessage.Kind
the Kind floor
kind
)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

COMPARATORback to summary
public static final Comparator<IMessage.Kind> COMPARATOR
nameback to summary
private final String name
precedenceback to summary
private final int precedence

Constructor Detail

Kindback to summary
private Kind(String name, int precedence)

Method Detail

compareToback to summary
public int compareTo(IMessage.Kind other)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
other:IMessage.Kind

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

isSameOrLessThanback to summary
public boolean isSameOrLessThan(IMessage.Kind kind)
Parameters
kind:IMessage.Kind

the Kind floor

Returns:boolean

false if kind is null or this has less precedence than kind, true otherwise.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.