/** Provide a non-fatal notification, unless suppressed by the -nowarn option. * @param key The key for the localized notification message. * @param args Fields of the notification message. */ public void mandatoryNote(final JavaFileObject file, String key, Object ... args) { JCDiagnostic.DiagnosticSource wrapper = null; if (file != null) { wrapper = new JCDiagnostic.DiagnosticSource() { public JavaFileObject getFile() { return file; } public CharSequence getName() { return JavacFileManager.getJavacBaseFileName(getFile()); } public int getLineNumber(int pos) { return Log.this.getLineNumber(pos); } public int getColumnNumber(int pos) { return Log.this.getColumnNumber(pos); } public Map<JCTree, Integer> getEndPosTable() { return (endPosTables == null ? null : endPosTables.get(file)); } }; } if (enforceMandatoryWarnings) report(diags.mandatoryNote(wrapper, key, args)); else report(diags.note(wrapper, null, key, args)); }
/** Provide a non-fatal notification, unless suppressed by the -nowarn option. * @param key The key for the localized notification message. * @param args Fields of the notification message. */ public void mandatoryNote(final JavaFileObject file, String key, Object ... args) { report(diags.mandatoryNote(getSource(file), key, args)); }
/** Provide a non-fatal notification, unless suppressed by the -nowarn option. * @param key The key for the localized notification message. * @param args Fields of the notification message. */ public void mandatoryNote(final JavaFileObject file, String key, Object ... args) { report(diags.mandatoryNote(wrap(file), key, args)); }
/** Provide a non-fatal notification, unless suppressed by the -nowarn option. * @param key The key for the localized notification message. * @param args Fields of the notification message. */ public void mandatoryNote(final JavaFileObject file, String key, Object ... args) { report(diags.mandatoryNote(getSource(file), key, args)); }