Package org.aspectj.bridge
Interface IMessageHolder
- All Superinterfaces:
IMessageHandler
- All Known Implementing Classes:
MessageHandler
,WeavingAdaptor.WeavingAdaptorMessageHolder
Hold and query a collection of messages.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
value for orGreater parameterstatic final boolean
value for orGreater parameterFields inherited from interface org.aspectj.bridge.IMessageHandler
SYSTEM_ERR, SYSTEM_OUT, THROW
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear any messages.IMessage[]
getMessages
(IMessage.Kind kind, boolean orGreater) Get all messages or those of a specific kind.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 Details
-
ORGREATER
static final boolean ORGREATERvalue for orGreater parameter- See Also:
-
EQUAL
static final boolean EQUALvalue for orGreater parameter- See Also:
-
-
Method Details
-
hasAnyMessage
Tell whether this holder has any message of this kind (optionally or greater).- Parameters:
kind
- the IMessage.Kind to check for - accept any if nullorGreater
- 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
Count the messages currently held by this holder. Pass null to get all kinds.- Parameters:
kind
- the IMessage.Kind expected, or null for all messagesorGreater
- 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
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 messagesorGreater
- 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
- Returns:
- unmodifiable List view of underlying collection of IMessage
-
clearMessages
Clear any messages.- Throws:
UnsupportedOperationException
- if message list is read-only
-