public class DiagnosticPrettyPrinter extends ObjectTake a
Diagnosticand pretty print it, using the same formatting as you'd find in the Oracle javac implementation. This ensures that no matter which compiler is being used, output to the user is consistent.
Output is given in the following format, where "summary" is the first line of
Diagnostic.getMessage(Locale)and "Remainder of message" are all the other lines.
Path-to-file:line-number: kind-of-error: summary\n Context from code ^ Remainder of message
All Methods Static Methods Concrete Methods Modifier and Type Method Description
format(Diagnostic<? extends JavaFileObject> diagnostic)