Search in sources :

Example 1 with FormatMethod

use of com.google.errorprone.annotations.FormatMethod in project closure-compiler by google.

the class ErrorReporter method reportError.

@FormatMethod
public final void reportError(SourcePosition location, @FormatString String format, Object... arguments) {
    hadError = true;
    String message = SimpleFormat.format(format, arguments);
    reportError(location, message);
}
Also used : FormatString(com.google.errorprone.annotations.FormatString) FormatMethod(com.google.errorprone.annotations.FormatMethod)

Example 2 with FormatMethod

use of com.google.errorprone.annotations.FormatMethod in project closure-compiler by google.

the class ErrorReporter method reportWarning.

@FormatMethod
public final void reportWarning(SourcePosition location, @FormatString String format, Object... arguments) {
    String message = SimpleFormat.format(format, arguments);
    reportWarning(location, message);
}
Also used : FormatString(com.google.errorprone.annotations.FormatString) FormatMethod(com.google.errorprone.annotations.FormatMethod)

Aggregations

FormatMethod (com.google.errorprone.annotations.FormatMethod)2 FormatString (com.google.errorprone.annotations.FormatString)2