org.aspectj.weaver.tools
Class WeavingAdaptor.WeavingAdaptorMessageHolder

java.lang.Object
  extended by org.aspectj.bridge.MessageHandler
      extended by org.aspectj.weaver.tools.WeavingAdaptor.WeavingAdaptorMessageHolder
All Implemented Interfaces:
IMessageHandler, IMessageHolder
Enclosing class:
WeavingAdaptor

protected class WeavingAdaptor.WeavingAdaptorMessageHolder
extends MessageHandler

Processes messages arising from weaver operations. Tell weaver to abort on any message more severe than warning.


Field Summary
protected  boolean traceMessages
           
 
Fields inherited from class org.aspectj.bridge.MessageHandler
handleMessageResult, ignoring, interceptor, messages
 
Fields inherited from interface org.aspectj.bridge.IMessageHolder
EQUAL, ORGREATER
 
Fields inherited from interface org.aspectj.bridge.IMessageHandler
SYSTEM_ERR, SYSTEM_OUT, THROW
 
Constructor Summary
WeavingAdaptor.WeavingAdaptorMessageHolder(java.io.PrintWriter writer)
           
 
Method Summary
 void dontIgnore(IMessage.Kind kind)
          Remove a message kind from the list of those ignored from now on.
 void flushMessages()
           
 java.util.List<IMessage> getUnmodifiableListView()
           
 boolean handleMessage(IMessage message)
          This implementation accumulates message.
 void ignore(IMessage.Kind kind)
          Set a message kind to be ignored from now on
 boolean isIgnoring(IMessage.Kind kind)
          Signal clients whether this will ignore messages of a given type.
protected  java.lang.String render(IMessage message)
           
 void setDelegate(IMessageHandler messageHandler)
           
 
Methods inherited from class org.aspectj.bridge.MessageHandler
clearMessages, getErrors, getMessages, getWarnings, hasAnyMessage, init, init, numMessages, setInterceptor, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

traceMessages

protected boolean traceMessages
Constructor Detail

WeavingAdaptor.WeavingAdaptorMessageHolder

public WeavingAdaptor.WeavingAdaptorMessageHolder(java.io.PrintWriter writer)
Method Detail

render

protected java.lang.String render(IMessage message)

flushMessages

public void flushMessages()

setDelegate

public void setDelegate(IMessageHandler messageHandler)

handleMessage

public boolean handleMessage(IMessage message)
                      throws AbortException
Description copied from class: MessageHandler
This implementation accumulates message. If an interceptor is installed and returns true (message handled), then processing halts and the message is not accumulated.

Specified by:
handleMessage in interface IMessageHandler
Overrides:
handleMessage in class MessageHandler
Parameters:
message - the IMessage to handle - never null
Returns:
true on interception or the constructor value otherwise
Throws:
AbortException - depending on handler logic.
See Also:
IMessageHandler.handleMessage(IMessage)

isIgnoring

public boolean isIgnoring(IMessage.Kind kind)
Description copied from interface: IMessageHandler
Signal clients whether this will ignore messages of a given type. Clients may use this to avoid constructing or sending certain messages.

Specified by:
isIgnoring in interface IMessageHandler
Overrides:
isIgnoring in class MessageHandler
Returns:
true if this kind has been flagged to be ignored.
See Also:
MessageHandler.ignore(IMessage.Kind), org.aspectj.bridge.IMessageHandler#isIgnoring(Kind)

dontIgnore

public void dontIgnore(IMessage.Kind kind)
Description copied from class: MessageHandler
Remove a message kind from the list of those ignored from now on.

Specified by:
dontIgnore in interface IMessageHandler
Overrides:
dontIgnore in class MessageHandler

ignore

public void ignore(IMessage.Kind kind)
Description copied from class: MessageHandler
Set a message kind to be ignored from now on

Specified by:
ignore in interface IMessageHandler
Overrides:
ignore in class MessageHandler

getUnmodifiableListView

public java.util.List<IMessage> getUnmodifiableListView()
Specified by:
getUnmodifiableListView in interface IMessageHolder
Overrides:
getUnmodifiableListView in class MessageHandler
Returns:
unmodifiable List view of underlying collection of IMessage
See Also:
IMessageHolder.getUnmodifiableListView()