@Override public T parse(ParserState input) throws ParseException { input.mark(); T result = parser.parse(input); if (!nullOrUnexpected(result)) { input.release(); } else { input.rewind(); } return result; } };
@Override public LocalReferenceType parse(ParserState input) throws ParseException { input.mark(); String typeReference = REF_PARSER.parse(input); if (typeReference == null) { input.rewind(); return null; } input.release(); ConjureMetrics.incrementCounter(LocalReferenceType.class); return LocalReferenceType.of(TypeName.of(typeReference)); } }