public class DefaultInvalidInputErrorFormatter extends java.lang.Object implements Formatter<InvalidInputError>
Formatter
for InvalidInputError
s that automatically creates the correct "expected" text
for the error.Constructor and Description |
---|
DefaultInvalidInputErrorFormatter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(InvalidInputError error)
Create a string representation for the given obejct.
|
java.lang.String |
getExpectedString(InvalidInputError error) |
java.lang.String[] |
getLabels(Matcher matcher)
Gets the labels corresponding to the given matcher, AnyOfMatchers are treated specially in that their
label is constructed as a list of their contents
|
java.lang.String |
join(java.util.List<java.lang.String> labelList) |
public java.lang.String format(InvalidInputError error)
Formatter
format
in interface Formatter<InvalidInputError>
error
- the object to formatpublic java.lang.String getExpectedString(InvalidInputError error)
public java.lang.String[] getLabels(Matcher matcher)
matcher
- the matcherpublic java.lang.String join(java.util.List<java.lang.String> labelList)