Java tutorial
//package com.java2s; import javax.annotation.processing.Messager; import javax.lang.model.element.Element; import javax.tools.Diagnostic; public class Main { private static void _error(Messager messager, Element element, String message, Object... args) { if (args.length > 0) { message = String.format(message, args); } messager.printMessage(Diagnostic.Kind.ERROR, message, element); } }