| 22 | import java.io.Reader; |
| 23 | |
| 24 | public abstract class AbstractParser<T> implements Parser<T> { |
| 25 | |
| 26 | @Override |
| 27 | public final T parse(CharSequence input) { |
| 28 | Assert.hasText(input, "CharSequence cannot be null or empty."); |
| 29 | return parse(input, 0, input.length()); |
| 30 | } |
| 31 | |
| 32 | @Override |
| 33 | public T parse(CharSequence input, int start, int end) { |
| 34 | Assert.hasText(input, "CharSequence cannot be null or empty."); |
| 35 | Reader reader = new CharSequenceReader(input, start, end); |
| 36 | return parse(reader); |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | public final T parse(InputStream in) { |
| 41 | Assert.notNull(in, "InputStream cannot be null."); |
| 42 | Reader reader = Streams.reader(in); |
| 43 | return parse(reader); |
| 44 | } |
| 45 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…