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
-
-
Constructor Summary
Constructors Constructor Description 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_TYPES
List.MavenMessageHandler(org.apache.maven.plugin.logging.Log log, java.util.List<org.aspectj.bridge.IMessage.Kind> showDetailsForMessageKindList)
Constructs a MessageHandler with a Maven plugin logger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
handleMessage(org.aspectj.bridge.IMessage message)
Copies output from the supplied message onto the active Maven Log.
-
-
-
Constructor Detail
-
MavenMessageHandler
public MavenMessageHandler(org.apache.maven.plugin.logging.Log log, java.util.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_TYPES
List.- Parameters:
log
- The active Maven Log.
-
-
Method Detail
-
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:
handleMessage
in interfaceorg.aspectj.bridge.IMessageHandler
- Overrides:
handleMessage
in classorg.aspectj.bridge.MessageHandler
-
-