toDiagnosticInfo
Create an immutable diagnostic record from a Java compiler diagnostic.
Receiver
Diagnostic emitted by a Java tool
Parameters
tool
Name of the tool producing this diagnostic; defaults to the static string compiler