eu.toolchain.serializer.processor.PrefixingMessager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tiny-serializer-processor Show documentation
Show all versions of tiny-serializer-processor Show documentation
A processor for the @AutoSerialize annotation
The newest version!
package eu.toolchain.serializer.processor;
import javax.annotation.processing.Messager;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.Element;
import javax.tools.Diagnostic.Kind;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class PrefixingMessager implements Messager {
private final String prefix;
private final Messager delegate;
@Override
public void printMessage(Kind kind, CharSequence msg) {
delegate.printMessage(kind, prefix + ": " + msg);
}
@Override
public void printMessage(Kind kind, CharSequence msg, Element e) {
delegate.printMessage(kind, prefix + ": " + msg, e);
}
@Override
public void printMessage(Kind kind, CharSequence msg, Element e, AnnotationMirror a) {
delegate.printMessage(kind, prefix + ": " + msg, e, a);
}
@Override
public void printMessage(
Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v
) {
delegate.printMessage(kind, prefix + ": " + msg, e, a, v);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy