Package org.parboiled.errors
Class DefaultInvalidInputErrorFormatter
java.lang.Object
org.parboiled.errors.DefaultInvalidInputErrorFormatter
- All Implemented Interfaces:
Formatter<InvalidInputError>
public class DefaultInvalidInputErrorFormatter
extends Object
implements Formatter<InvalidInputError>
A
Formatter
for InvalidInputError
s that automatically creates the correct "expected" text
for the error.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformat
(InvalidInputError error) Create a string representation for the given obejct.String[]
Gets the labels corresponding to the given matcher, AnyOfMatchers are treated specially in that their label is constructed as a list of their contents
-
Constructor Details
-
DefaultInvalidInputErrorFormatter
public DefaultInvalidInputErrorFormatter()
-
-
Method Details
-
format
Description copied from interface:Formatter
Create a string representation for the given obejct.- Specified by:
format
in interfaceFormatter<InvalidInputError>
- Parameters:
error
- the object to format- Returns:
- a string describing the object
-
getExpectedString
-
getLabels
Gets the labels corresponding to the given matcher, AnyOfMatchers are treated specially in that their label is constructed as a list of their contents- Parameters:
matcher
- the matcher- Returns:
- the labels
-
join
-