@FormatMethod public Builder withMessage(@FormatString String message, Object... args) { this.message = String.format(checkNotNull(message), args); return this; }
@FormatMethod protected ManifestValidationException(@FormatString String message, Object... args) { super(String.format(checkNotNull(message), args)); } }
@FormatMethod protected ResouceTableException(@FormatString String message, Object... args) { super(String.format(checkNotNull(message), args)); }
@FormatMethod private ManifestSdkTargetingException(@FormatString String message, Object... args) { super(message, args); }
/** Same as {@link #setShortDescription(String)} but allowing formatted string. */ @FormatMethod Builder setShortDescription(String shortDescriptionFormat, Object... args) { return setShortDescription(String.format(shortDescriptionFormat, args)); }
@FormatMethod private ManifestVersionException(@FormatString String message, Object... args) { super(message, args); }
@FormatMethod public DeviceNotFoundException(@FormatString String message, Object... args) { super(String.format(checkNotNull(message), args)); }
@FormatMethod private ManifestFusingException(@FormatString String message, Object... args) { super(message, args); }
@FormatMethod protected BundleFileTypesException(@FormatString String message, Object... args) { super(String.format(checkNotNull(message), args)); }
/** Same as {@link #setDescription(String)} but allowing formatted string. */ @FormatMethod Builder setDescription(@FormatString String description, Object... args) { return setDescription(String.format(description, args)); }
/** * Logs the specified message. * * @param format * A <a href="../util/Formatter.html#syntax">format string</a> * @param args * Arguments referenced by the format specifiers in the format string. If there are more arguments than * format specifiers, the extra arguments are ignored. The number of arguments is variable and may be * zero. */ @FormatMethod void print(String format, Object... args); }
/** * Returns an error message of the form "@<i>annotation</i> methods <i>rule</i>", where * <i>rule</i> comes from calling {@link String#format(String, Object...)} on {@code ruleFormat} * and the other arguments. */ @FormatMethod protected final String bindingMethods(String ruleFormat, Object... args) { return new Formatter() .format("@%s methods ", methodAnnotation.getSimpleName()) .format(ruleFormat, args) .toString(); }
/** * Logs the specified message. * * @param format * A <a href="../util/Formatter.html#syntax">format string</a> * @param args * Arguments referenced by the format specifiers in the format string. If there are more arguments than * format specifiers, the extra arguments are ignored. The number of arguments is variable and may be * zero. */ @FormatMethod public void log(final String format, final Object... args) { logger.log(format, args); }
/** * Logs the specified message. * * @param format * A <a href="../util/Formatter.html#syntax">format string</a> * @param args * Arguments referenced by the format specifiers in the format string. If there are more arguments than * format specifiers, the extra arguments are ignored. The number of arguments is variable and may be * zero. */ @FormatMethod void log(final String format, final Object... args) { print(String.format(format, args)); }
/** * Logs the specified information message. Use this method to log any useful information when composing this * report. * * @param format * A <a href="../util/Formatter.html#syntax">format string</a> * @param args * Arguments referenced by the format specifiers in the format string. If there are more arguments than * format specifiers, the extra arguments are ignored. The number of arguments is variable and may be * zero. */ @FormatMethod public void logInfo(final String format, final Object... args) { aggregatedReport.logInfo(format, args); }
/** * Reports an error at the specified location. * * @param position The position of the error. * @param message The message to report in String.format style. * @param arguments The arguments to fill in the message format. */ @FormatMethod private void reportError( SourcePosition position, @FormatString String message, Object... arguments) { errorReporter.reportError(position, message, arguments); }
@FormatMethod private void reportError( SourcePosition position, @FormatString String format, Object... arguments) { errorReporter.reportError(position, format, arguments); }
@Override @FormatMethod public void reportComponent( Diagnostic.Kind diagnosticKind, ComponentNode componentNode, String messageFormat, Object firstArg, Object... moreArgs) { reportComponent( diagnosticKind, componentNode, formatMessage(messageFormat, firstArg, moreArgs)); }
/** * Reports an error at the current location. * @param message The message to report in String.format style. * @param arguments The arguments to fill in the message format. */ @FormatMethod private void reportError(@FormatString String message, Object... arguments) { errorReporter.reportError(scanner.getPosition(), message, arguments); }
@FormatMethod private void reportError(@FormatString String format, Object... arguments) { reportError(getPosition(), format, arguments); }