/** * Create a new diagnostic of the given kind. * @param kind The diagnostic kind * @param lc The lint category, if applicable, or null * @param flags The set of flags for the diagnostic * @param source The source of the compilation unit, if any, in which to report the message. * @param pos The source position at which to report the message. * @param key The key for the localized message. * @param args Fields of the message. */ public JCDiagnostic create( DiagnosticType kind, LintCategory lc, Set<DiagnosticFlag> flags, DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(formatter, kind, lc, flags, source, pos, qualify(kind, key), args); }
/** * Create a new diagnostic of the given kind. * @param kind The diagnostic kind * @param lc The lint category, if applicable, or null * @param flags The set of flags for the diagnostic * @param source The source of the compilation unit, if any, in which to report the message. * @param pos The source position at which to report the message. * @param key The key for the localized message. * @param args Fields of the message. */ public JCDiagnostic create( DiagnosticType kind, LintCategory lc, Set<DiagnosticFlag> flags, DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(formatter, kind, lc, flags, source, pos, qualify(kind, key), args); }
/** * Create a fragment diagnostic, for use as an argument in other diagnostics * @param key The key for the localized error message. * @param args Fields of the error message. */ public JCDiagnostic fragment(String key, Object... args) { return new JCDiagnostic(messages, FRAGMENT, false, null, null, qualify(FRAGMENT, key), args); }
/** * Create a warning diagnostic that will not be hidden by the -nowarn or -Xlint:none options. * @param source The source of the compilation unit, if any, in which to report the warning. * @param pos The source position at which to report the warning. * @param key The key for the localized error message. * @param args Fields of the error message. * @see MandatoryWarningHandler */ public JCDiagnostic mandatoryWarning( DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(messages, WARNING, true, source, pos, qualify(WARNING, key), args); }
/** * Create a note diagnostic that will not be hidden by the -nowarn or -Xlint:none options. * @param key The key for the localized error message. * @param args Fields of the error message. * @see MandatoryWarningHandler */ public JCDiagnostic mandatoryNote(DiagnosticSource source, String key, Object... args) { return new JCDiagnostic(messages, NOTE, true, source, null, qualify(NOTE, key), args); }
/** * Create a warning diagnostic that will not be hidden by the -nowarn or -Xlint:none options. * @param source The source of the compilation unit, if any, in which to report the warning. * @param pos The source position at which to report the warning. * @param key The key for the localized error message. * @param args Fields of the error message. * @see MandatoryWarningHandler */ public JCDiagnostic mandatoryWarning( DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(messages, WARNING, true, source, pos, qualify(WARNING, key), args); }
/** * Create an error diagnostic. * @param source The source of the compilation unit, if any, in which to report the error. * @param pos The source position at which to report the error. * @param key The key for the localized error message. * @param args Fields of the error message. */ public JCDiagnostic error( DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(messages, ERROR, true, source, pos, qualify(ERROR, key), args); }
/** * Create an error diagnostic. * @param source The source of the compilation unit, if any, in which to report the error. * @param pos The source position at which to report the error. * @param key The key for the localized error message. * @param args Fields of the error message. */ public JCDiagnostic error( DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(messages, ERROR, true, source, pos, qualify(ERROR, key), args); }
/** * Create a fragment diagnostic, for use as an argument in other diagnostics * @param key The key for the localized error message. * @param args Fields of the error message. */ public JCDiagnostic fragment(String key, Object... args) { return new JCDiagnostic(messages, FRAGMENT, false, null, null, qualify(FRAGMENT, key), args); }
/** * Create a warning diagnostic. * @param source The source of the compilation unit, if any, in which to report the warning. * @param pos The source position at which to report the warning. * @param key The key for the localized error message. * @param args Fields of the error message. */ public JCDiagnostic warning( DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(messages, WARNING, false, source, pos, qualify(WARNING, key), args); }
/** * Create a note diagnostic. * @param source The source of the compilation unit, if any, in which to report the note. * @param pos The source position at which to report the note. * @param key The key for the localized error message. * @param args Fields of the error message. */ public JCDiagnostic note( DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(messages, NOTE, false, source, pos, qualify(NOTE, key), args); }
/** * Create a warning diagnostic. * @param source The source of the compilation unit, if any, in which to report the warning. * @param pos The source position at which to report the warning. * @param key The key for the localized error message. * @param args Fields of the error message. */ public JCDiagnostic warning( DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(messages, WARNING, false, source, pos, qualify(WARNING, key), args); }
/** * Create a note diagnostic that will not be hidden by the -nowarn or -Xlint:none options. * @param key The key for the localized error message. * @param args Fields of the error message. * @see MandatoryWarningHandler */ public JCDiagnostic mandatoryNote(DiagnosticSource source, String key, Object... args) { return new JCDiagnostic(messages, NOTE, true, source, null, qualify(NOTE, key), args); }
/** * Create a note diagnostic. * @param source The source of the compilation unit, if any, in which to report the note. * @param pos The source position at which to report the note. * @param key The key for the localized error message. * @param args Fields of the error message. */ public JCDiagnostic note( DiagnosticSource source, DiagnosticPosition pos, String key, Object... args) { return new JCDiagnostic(messages, NOTE, false, source, pos, qualify(NOTE, key), args); }