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 Details

  • Method Details

    • 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

      List<IMessage> getUnmodifiableListView()
      Returns:
      unmodifiable List view of underlying collection of IMessage
    • clearMessages

      void clearMessages() throws UnsupportedOperationException
      Clear any messages.
      Throws:
      UnsupportedOperationException - if message list is read-only