Gets a list view of diagnostics collected by this object.returna list view of diagnostics return Collections.unmodifiableList(diagnostics);
return Collections.unmodifiableList(diagnostics);
diagnostics.add(diagnostic);