下面列出了怎么用com.sun.tools.javac.util.JCDiagnostic.Note的API类实例代码及写法,或者点击链接到github查看源代码。
public void note(String key, Object... params) {
// no "raw" API for producing notes; so omitting them on Java 8
if (registeredResourceBundle) {
currentLog().note(new Note("compiler", key, params));
}
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void note(Note noteKey) {
report(diags.note(source, null, noteKey));
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void note(DiagnosticPosition pos, Note noteKey) {
report(diags.note(source, pos, noteKey));
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void note(int pos, Note noteKey) {
report(diags.note(source, wrap(pos), noteKey));
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void note(JavaFileObject file, Note noteKey) {
report(diags.note(getSource(file), null, noteKey));
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void mandatoryNote(final JavaFileObject file, Note noteKey) {
report(diags.mandatoryNote(getSource(file), noteKey));
}
public void note(String key, Object... params) {
// no "raw" API for producing notes; so omitting them on Java 8
if (registeredResourceBundle) {
currentLog().note(new Note("compiler", key, params));
}
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void note(Note noteKey) {
report(diags.note(source, null, noteKey));
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void note(DiagnosticPosition pos, Note noteKey) {
report(diags.note(source, pos, noteKey));
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void note(int pos, Note noteKey) {
report(diags.note(source, wrap(pos), noteKey));
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void note(JavaFileObject file, Note noteKey) {
report(diags.note(getSource(file), null, noteKey));
}
/** Provide a non-fatal notification, unless suppressed by the -nowarn option.
* @param noteKey The key for the localized notification message.
*/
public void mandatoryNote(final JavaFileObject file, Note noteKey) {
report(diags.mandatoryNote(getSource(file), noteKey));
}