org.aspectj.bridge
Interface IMessageHolder

All Superinterfaces:
IMessageHandler
All Known Implementing Classes:
MessageHandler, WeavingAdaptor.WeavingAdaptorMessageHolder

public interface IMessageHolder
extends IMessageHandler

Hold and query a collection of messages.


Field Summary
static boolean EQUAL
          value for orGreater parameter
static boolean ORGREATER
          value for orGreater parameter
 
Fields inherited from interface org.aspectj.bridge.IMessageHandler
SYSTEM_ERR, SYSTEM_OUT, THROW
 
Method Summary
 void clearMessages()
          Clear any messages.
 IMessage[] getMessages(IMessage.Kind kind, boolean orGreater)
          Get all messages or those of a specific kind.
 java.util.List<IMessage> getUnmodifiableListView()
           
 boolean hasAnyMessage(IMessage.Kind kind, boolean orGreater)
          Tell whether this holder has any message of this kind (optionally or greater).
 int numMessages(IMessage.Kind kind, boolean orGreater)
          Count the messages currently held by this holder.
 
Methods inherited from interface org.aspectj.bridge.IMessageHandler
dontIgnore, handleMessage, ignore, isIgnoring
 

Field Detail

ORGREATER

static final boolean ORGREATER
value for orGreater parameter

See Also:
Constant Field Values

EQUAL

static final boolean EQUAL
value for orGreater parameter

See Also:
Constant Field Values
Method Detail

hasAnyMessage

boolean hasAnyMessage(IMessage.Kind kind,
                      boolean orGreater)
Tell whether this holder has any message of this kind (optionally or greater).

Parameters:
kind - the IMessage.Kind to check for - accept any if null
orGreater - if true, also any greater than the target kind as determined by IMessage.Kind.COMPARATOR
Returns:
true if this holder has any message of this kind, or if orGreater and any message has a greater kind, as determined by IMessage.Kind.COMPARATOR

numMessages

int numMessages(IMessage.Kind kind,
                boolean orGreater)
Count the messages currently held by this holder. Pass null to get all kinds.

Parameters:
kind - the IMessage.Kind expected, or null for all messages
orGreater - if true, also any greater than the target kind as determined by IMessage.Kind.COMPARATOR
Returns:
number of IMessage held (now) by this holder

getMessages

IMessage[] getMessages(IMessage.Kind kind,
                       boolean orGreater)
Get all messages or those of a specific kind. Pass null to get all kinds.

Parameters:
kind - the IMessage.Kind expected, or null for all messages
orGreater - if true, also get any greater than the target kind as determined by IMessage.Kind.COMPARATOR
Returns:
IMessage[] of messages of the right kind, or IMessage.NONE

getUnmodifiableListView

java.util.List<IMessage> getUnmodifiableListView()
Returns:
unmodifiable List view of underlying collection of IMessage

clearMessages

void clearMessages()
                   throws java.lang.UnsupportedOperationException
Clear any messages.

Throws:
java.lang.UnsupportedOperationException - if message list is read-only