Class MapperAnnotatedFormattingMessenger
- java.lang.Object
-
- org.mapstruct.ap.internal.processor.MapperAnnotatedFormattingMessenger
-
- All Implemented Interfaces:
FormattingMessager
public class MapperAnnotatedFormattingMessenger extends Object implements FormattingMessager
Handles redirection of errors/warnings so that they're shown on the mapper instead of hidden on a superclass.- Author:
- Ben Zegveld
-
-
Constructor Summary
Constructors Constructor Description MapperAnnotatedFormattingMessenger(FormattingMessager delegateMessager, TypeElement mapperTypeElement, TypeUtils typeUtils)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isErroneous()
void
note(int level, Message log, Object... args)
Just log as plain notevoid
printMessage(Element e, AnnotationMirror a, AnnotationValue v, Message msg, Object... args)
Prints a message of the specified kind at the location of the annotation value inside the annotation positionHint of the annotated element.void
printMessage(Element e, AnnotationMirror a, Message msg, Object... args)
Prints a message of the specified kind at the location of the annotation positionHint of the annotated element.void
printMessage(Element e, Message msg, Object... args)
Prints a message of the specified kind at the location of the element.void
printMessage(Message msg, Object... args)
Prints a message of the specified kind.
-
-
-
Constructor Detail
-
MapperAnnotatedFormattingMessenger
public MapperAnnotatedFormattingMessenger(FormattingMessager delegateMessager, TypeElement mapperTypeElement, TypeUtils typeUtils)
-
-
Method Detail
-
printMessage
public void printMessage(Message msg, Object... args)
Description copied from interface:FormattingMessager
Prints a message of the specified kind.- Specified by:
printMessage
in interfaceFormattingMessager
- Parameters:
msg
- the messageargs
- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored
-
printMessage
public void printMessage(Element e, Message msg, Object... args)
Description copied from interface:FormattingMessager
Prints a message of the specified kind at the location of the element.- Specified by:
printMessage
in interfaceFormattingMessager
- Parameters:
e
- the element to use as a position hintmsg
- the messageargs
- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored
-
printMessage
public void printMessage(Element e, AnnotationMirror a, Message msg, Object... args)
Description copied from interface:FormattingMessager
Prints a message of the specified kind at the location of the annotation positionHint of the annotated element.- Specified by:
printMessage
in interfaceFormattingMessager
- Parameters:
e
- the annotated elementa
- the annotation to use as a position hint (can be null)msg
- the messageargs
- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored
-
printMessage
public void printMessage(Element e, AnnotationMirror a, AnnotationValue v, Message msg, Object... args)
Description copied from interface:FormattingMessager
Prints a message of the specified kind at the location of the annotation value inside the annotation positionHint of the annotated element.- Specified by:
printMessage
in interfaceFormattingMessager
- Parameters:
e
- the annotated elementa
- the annotation containing the annotation valuev
- the annotation value to use as a position hintmsg
- the messageargs
- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored
-
note
public void note(int level, Message log, Object... args)
Description copied from interface:FormattingMessager
Just log as plain note- Specified by:
note
in interfaceFormattingMessager
- Parameters:
level
- nesting levellog
- the log messageargs
- the arguments
-
isErroneous
public boolean isErroneous()
- Specified by:
isErroneous
in interfaceFormattingMessager
-
-