src/share/classes/com/sun/tools/javac/util/AbstractLog.java

changeset 612
d1bd93028447
parent 581
f2fdd52e4e87
child 726
2974d3800eb1
     1.1 --- a/src/share/classes/com/sun/tools/javac/util/AbstractLog.java	Mon Jul 26 14:18:45 2010 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/util/AbstractLog.java	Mon Jul 26 14:25:56 2010 -0700
     1.3 @@ -29,6 +29,7 @@
     1.4  import java.util.Map;
     1.5  import javax.tools.JavaFileObject;
     1.6  
     1.7 +import com.sun.tools.javac.code.Lint.LintCategory;
     1.8  import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
     1.9  import com.sun.tools.javac.util.JCDiagnostic.SimpleDiagnosticPosition;
    1.10  
    1.11 @@ -112,6 +113,16 @@
    1.12          report(diags.warning(source, null, key, args));
    1.13      }
    1.14  
    1.15 +    /** Report a lint warning, unless suppressed by the  -nowarn option or the
    1.16 +     *  maximum number of warnings has been reached.
    1.17 +     *  @param lc     The lint category for the diagnostic
    1.18 +     *  @param key    The key for the localized warning message.
    1.19 +     *  @param args   Fields of the warning message.
    1.20 +     */
    1.21 +    public void warning(LintCategory lc, String key, Object ... args) {
    1.22 +        report(diags.warning(lc, key, args));
    1.23 +    }
    1.24 +
    1.25      /** Report a warning, unless suppressed by the  -nowarn option or the
    1.26       *  maximum number of warnings has been reached.
    1.27       *  @param pos    The source position at which to report the warning.
    1.28 @@ -122,6 +133,17 @@
    1.29          report(diags.warning(source, pos, key, args));
    1.30      }
    1.31  
    1.32 +    /** Report a lint warning, unless suppressed by the  -nowarn option or the
    1.33 +     *  maximum number of warnings has been reached.
    1.34 +     *  @param lc     The lint category for the diagnostic
    1.35 +     *  @param pos    The source position at which to report the warning.
    1.36 +     *  @param key    The key for the localized warning message.
    1.37 +     *  @param args   Fields of the warning message.
    1.38 +     */
    1.39 +    public void warning(LintCategory lc, DiagnosticPosition pos, String key, Object ... args) {
    1.40 +        report(diags.warning(lc, source, pos, key, args));
    1.41 +    }
    1.42 +
    1.43      /** Report a warning, unless suppressed by the  -nowarn option or the
    1.44       *  maximum number of warnings has been reached.
    1.45       *  @param pos    The source position at which to report the warning.
    1.46 @@ -141,6 +163,16 @@
    1.47          report(diags.mandatoryWarning(source, pos, key, args));
    1.48      }
    1.49  
    1.50 +    /** Report a warning.
    1.51 +     *  @param lc     The lint category for the diagnostic
    1.52 +     *  @param pos    The source position at which to report the warning.
    1.53 +     *  @param key    The key for the localized warning message.
    1.54 +     *  @param args   Fields of the warning message.
    1.55 +     */
    1.56 +    public void mandatoryWarning(LintCategory lc, DiagnosticPosition pos, String key, Object ... args) {
    1.57 +        report(diags.mandatoryWarning(lc, source, pos, key, args));
    1.58 +    }
    1.59 +
    1.60      /** Provide a non-fatal notification, unless suppressed by the -nowarn option.
    1.61       *  @param key    The key for the localized notification message.
    1.62       *  @param args   Fields of the notint an error or warning message:

mercurial