@Test public void testGetErrorString() { assertThat( getErrorString( new PotentialMatch( new PathElement(STRING_LITERAL, "\"b\"", 0, 0), "a", ImmutableList.of())), equalTo("'b'")); assertThat( getErrorString( new PotentialMatch(new PathElement(IP_ADDRESS, "label", 0, 0), "", ImmutableList.of())), equalTo(IP_ADDRESS.toString())); }
static String getErrorString( String input, Grammar grammar, InvalidInputError error, Map<String, Anchor.Type> anchorTypes) { return String.format( "%s. See %s for valid grammar.", getErrorString( input, grammar.getFriendlyName(), error.getStartIndex(), getPotentialMatches(error, anchorTypes, true)), grammar.getFullUrl()); }
ParserUtils { static String getErrorString( String input, Grammar grammar, InvalidInputError error, Map<String, Anchor.Type> anchorTypes) { return String.format( "%s. See %s for valid grammar.", getErrorString( input, grammar.getFriendlyName(), error.getStartIndex(), getPotentialMatches(error, anchorTypes, true)), grammar.getFullUrl()); } }
ParserUtils { static String getErrorString( String input, Grammar grammar, InvalidInputError error, Map<String, Anchor.Type> anchorTypes) { return String.format( "%s. See %s for valid grammar.", getErrorString( input, grammar.getFriendlyName(), error.getStartIndex(), getPotentialMatches(error, anchorTypes, true)), grammar.getFullUrl()); }  }
ParserUtils { static String getErrorString( String input, Grammar grammar, InvalidInputError error, Map<String, Anchor.Type> anchorTypes) { return String.format( "%s. See %s for valid grammar.", getErrorString( input, grammar.getFriendlyName(), error.getStartIndex(), getPotentialMatches(error, anchorTypes, true)), grammar.getFullUrl()); }   }
ParserUtils { static String getErrorString( String input, Grammar grammar, InvalidInputError error, Map<String, Anchor.Type> anchorTypes) { return String.format( "%s. See %s for valid grammar.", getErrorString( input, grammar.getFriendlyName(), error.getStartIndex(), getPotentialMatches(error, anchorTypes, true)), grammar.getFullUrl()); }    }