public class MessageFormatter
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format(Description d,
java.lang.String format,
java.lang.Object... args)
Interprets a printf-style format
String for failed assertion messages. |
static MessageFormatter |
instance() |
public static MessageFormatter instance()
public java.lang.String format(Description d, java.lang.String format, java.lang.Object... args)
String for failed assertion messages. It is similar to
String.format(String, Object...), except for:
Description is used as the first argument referenced in the format
stringString by invoking
ToString.toStringOf(Object).
d - the description of the failed assertion, may be null.format - the format string.args - arguments referenced by the format specifiers in the format string.String.java.lang.NullPointerException - if the format string is null.Copyright © 2007–2018. All rights reserved.