java.lang.Object
nl.jqno.equalsverifier.internal.util.Formatter
Formats a string with the contents of one or more objects.
If possible, uses each object's toString method. If this throws an exception, Formatter creates its own
string representation of the object, containing its class name and the contents of its fields.
-
Field Details
-
message
-
objects
-
-
Constructor Details
-
Formatter
Private constructor. Callof(String, Object...)to instantiate.
-
-
Method Details
-
of
Factory method.- Parameters:
message- The string that will be formatted. The substring %% represents the location where each object's will string representation will be inserted.objects- The objects whose string representation will be inserted into the message string.- Returns:
- A
Formatter.
-
format
Formats the message with the given objects.- Returns:
- The message, with the given objects's string representations inserted into it.
- Throws:
IllegalStateException- if the number of %%'s in the message does not match the number of objects.
-
stringify
-
stringifyByReflection
-
objectToString
-