Top Description Fields Constructors Methods
org.aspectj.bridge

public Class MessageWriter

extends Object
implements IMessageHandler
Class Inheritance
All Implemented Interfaces
org.aspectj.bridge.IMessageHandler
Known Direct Subclasses
org.aspectj.weaver.tools.WeavingAdaptor.WeavingAdaptorMessageWriter
Imports
java.io.PrintWriter

An IMessageHandler implementation that writes all to a PrintWriter. Clients may set this up to throw AbortException for FAIL or ERROR messages. Subclasses may control whether messages are printed and how they are rendered by overriding render(IMessage).

Field Summary

Modifier and TypeField and Description
protected boolean
protected PrintWriter

Constructor Summary

AccessConstructor and Description
public
MessageWriter(PrintWriter writer, boolean abortOnFailure)

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
handleMessage(IMessage
the IMessage to handle - never null
message
)

Implements org.aspectj.bridge.IMessageHandler.handleMessage.

Handle message by printing and (if abortOnFailure) throwing an AbortException if the messages is a failure or an abort (but not for errors).
public void
public boolean
isIgnoring(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.isIgnoring.

Signal clients whether this will ignore messages of a given type.
protected String

Returns:

null to not print, or message rendering (including newlines)
render
(IMessage message)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

abortOnFailureback to summary
protected boolean abortOnFailure
writerback to summary
protected PrintWriter writer

Constructor Detail

MessageWriterback to summary
public MessageWriter(PrintWriter writer, boolean abortOnFailure)

Method Detail

dontIgnoreback to summary
public void dontIgnore(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.dontIgnore.

No-op

See Also
org.aspectj.bridge.IMessageHandler#isIgnoring(org.aspectj.bridge.IMessage.Kind)
handleMessageback to summary
public boolean handleMessage(IMessage message) throws AbortException

Implements org.aspectj.bridge.IMessageHandler.handleMessage.

Handle message by printing and (if abortOnFailure) throwing an AbortException if the messages is a failure or an abort (but not for errors).

Parameters
message:IMessage

Doc from org.aspectj.bridge.IMessageHandler.handleMessage.

the IMessage to handle - never null

Returns:boolean

Doc from org.aspectj.bridge.IMessageHandler.handleMessage.

true if this message was handled by this handler

Exceptions
AbortException:

Doc from org.aspectj.bridge.IMessageHandler.handleMessage.

depending on handler logic.

See Also
org.aspectj.bridge.IMessageHandler#handleMessage(IMessage)
ignoreback to summary
public void ignore(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.ignore.

No-op

See Also
org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
isIgnoringback to summary
public boolean isIgnoring(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.isIgnoring.

Doc from org.aspectj.bridge.IMessageHandler.isIgnoring.

Signal clients whether this will ignore messages of a given type. Clients may use this to avoid constructing or sending certain messages.

Returns:boolean

true if this handler is ignoring all messages of this type

See Also
org.aspectj.bridge.IMessageHandler#isIgnoring(org.aspectj.bridge.IMessage.Kind)
renderback to summary
protected String render(IMessage message)
Returns:String

null to not print, or message rendering (including newlines)