Interface IMessageHolder
- All Superinterfaces:
IMessageHandler
- All Known Implementing Classes:
MessageHandler, WeavingAdaptor.WeavingAdaptorMessageHolder
Hold and query a collection of messages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanvalue for orGreater parameterstatic final booleanvalue for orGreater parameterFields inherited from interface IMessageHandler
SYSTEM_ERR, SYSTEM_OUT, THROWModifier and TypeFieldDescriptionstatic final IMessageHandlerprint all to System.err and throw AbortException on failure or abort messagesstatic final IMessageHandlerprint all to System.out but do not throw AbortException on failure or abort messagesstatic final IMessageHandlerThrow exceptions for anything with ERROR or greater severity -
Method Summary
Modifier and TypeMethodDescriptionvoidClear any messages.IMessage[]getMessages(IMessage.Kind kind, boolean orGreater) Get all messages or those of a specific kind.booleanhasAnyMessage(IMessage.Kind kind, boolean orGreater) Tell whether this holder has any message of this kind (optionally or greater).intnumMessages(IMessage.Kind kind, boolean orGreater) Count the messages currently held by this holder.Methods inherited from interface IMessageHandler
dontIgnore, handleMessage, ignore, isIgnoringModifier and TypeMethodDescriptionvoiddontIgnore(IMessage.Kind kind) Allow fine grained configuration after initialization.booleanhandleMessage(IMessage message) Handle message, by reporting and/or throwing an AbortException.voidignore(IMessage.Kind kind) Allow fine grained configuration after initialization.booleanisIgnoring(IMessage.Kind kind) Signal clients whether this will ignore messages of a given type.
-
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
-
clearMessages
Clear any messages.- Throws:
UnsupportedOperationException- if message list is read-only
-