public class ElementParser<T> extends CharacterParser<T>
InputParser implementation for
Element data model types.| Modifier and Type | Method and Description |
|---|---|
static <T> ElementParser<T> |
of(AltFormat altFormat,
java.lang.Class<T> resultType)
Provides a factory method to create a new
ElementParser that
handles a particular representation to produce a particular type of
result. |
<R extends T> |
parse(java.io.Reader inputReader,
InputProperties inProps,
java.lang.Class<R> resultClass)
Parses character content with the specified properties to produce a result
of an expected type.
|
parsegetAltFormat, getResultTypepublic static <T> ElementParser<T> of(AltFormat altFormat, java.lang.Class<T> resultType)
ElementParser that
handles a particular representation to produce a particular type of
result.T - base type of parse result objectsaltFormat - alternate representation parsedresultType - type of result object producedjava.lang.IllegalArgumentException - if the representation does not have an
associated wire format that can be used to parse the content.public <R extends T> R parse(java.io.Reader inputReader, InputProperties inProps, java.lang.Class<R> resultClass) throws java.io.IOException, ServiceException
CharacterParserReader.parse in class CharacterParser<T>R - expected result typeinputReader - reader to parse data frominProps - input propertiesresultClass - class to instantiate and parse result into.java.io.IOException - if an error occurred reading data while parsingServiceException - if an error occurred within the content