Package org.codehaus.mojo.aspectj
Class MavenMessageHandler
java.lang.Object
org.aspectj.bridge.MessageHandler
org.codehaus.mojo.aspectj.MavenMessageHandler
- All Implemented Interfaces:
org.aspectj.bridge.IMessageHandler,org.aspectj.bridge.IMessageHolder
public class MavenMessageHandler
extends org.aspectj.bridge.MessageHandler
MessageHandler implementation which uses the standard Maven Log to emit
messages from the AJC process. For warnings and error messages from the AJC,
the message detail (containing information about class and line number location)
is emitted as well.
- Author:
- Kaare Nilsen, Lennart Jörelid, jGuru Europe AB
-
Field Summary
Fields inherited from class org.aspectj.bridge.MessageHandler
handleMessageResult, ignoring, interceptor, messagesFields inherited from interface org.aspectj.bridge.IMessageHandler
SYSTEM_ERR, SYSTEM_OUT, THROWFields inherited from interface org.aspectj.bridge.IMessageHolder
EQUAL, ORGREATER -
Constructor Summary
ConstructorsConstructorDescriptionMavenMessageHandler(org.apache.maven.plugin.logging.Log log) Constructs a MessageHandler with a Maven plugin logger, and emitting detailed information for all AJC message kinds theDEFAULT_DETAIL_TYPESList.MavenMessageHandler(org.apache.maven.plugin.logging.Log log, List<org.aspectj.bridge.IMessage.Kind> showDetailsForMessageKindList) Constructs a MessageHandler with a Maven plugin logger. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhandleMessage(org.aspectj.bridge.IMessage message) Copies output from the supplied message onto the active Maven Log.Methods inherited from class org.aspectj.bridge.MessageHandler
clearMessages, dontIgnore, getErrors, getMessages, getUnmodifiableListView, getWarnings, hasAnyMessage, ignore, init, init, isIgnoring, numMessages, setInterceptor, toString
-
Constructor Details
-
MavenMessageHandler
public MavenMessageHandler(org.apache.maven.plugin.logging.Log log, List<org.aspectj.bridge.IMessage.Kind> showDetailsForMessageKindList) Constructs a MessageHandler with a Maven plugin logger.- Parameters:
log- The active Maven Log.showDetailsForMessageKindList- A List holding all AJC message types for which this MavenMessageHandler should emit details onto the Maven log (i.e. class name, line/row number etc.)
-
MavenMessageHandler
public MavenMessageHandler(org.apache.maven.plugin.logging.Log log) Constructs a MessageHandler with a Maven plugin logger, and emitting detailed information for all AJC message kinds theDEFAULT_DETAIL_TYPESList.- Parameters:
log- The active Maven Log.
-
-
Method Details
-
handleMessage
public boolean handleMessage(org.aspectj.bridge.IMessage message) Copies output from the supplied message onto the active Maven Log. If the message type (i.e.message.getKind()) is listed in the showDetailsForMessageKindList List, the message is prefixed with location details (Class, row/line number etc.) as well.- Specified by:
handleMessagein interfaceorg.aspectj.bridge.IMessageHandler- Overrides:
handleMessagein classorg.aspectj.bridge.MessageHandler
-