eu.toolchain.serializer.processor.Exceptions 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.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.Element;
import javax.tools.Diagnostic;
public final class Exceptions {
public static BrokenException brokenElement(final String message, final Element element) {
return new BrokenException(message, messager -> {
messager.printMessage(Diagnostic.Kind.ERROR, message, element);
});
}
public static BrokenException brokenAnnotation(
final String message, final Element element, final AnnotationMirror annotation
) {
return new BrokenException(message, messager -> {
messager.printMessage(Diagnostic.Kind.ERROR, message, element, annotation);
});
}
public static BrokenException brokenValue(
final String message, final Element element, final AnnotationMirror annotation,
final AnnotationValue value
) {
return new BrokenException(message, messager -> {
messager.printMessage(Diagnostic.Kind.ERROR, message, element, annotation, value);
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy