Interface Parser<S>

  • Type Parameters:
    S - the internal model
    All Known Implementing Classes:
    CDAR2Parser, Converter

    public interface Parser<S>
    Defines methods for parsing a external representation of information into an internal model.
    Author:
    Christian Ohr
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      S parse​(InputStream message, Object... params)
      Parses a message and returns an internal representation of the information.
      S parse​(Reader reader, Object... params)
      Parses a message and returns an internal representation of the information.
      S parse​(String message, Object... params)
      Parses a message and returns an internal representation of the information.
      S parse​(Source source, Object... params)
      Parses a message and returns an internal representation of the information.
    • Method Detail

      • parse

        S parse​(String message,
                Object... params)
        Parses a message and returns an internal representation of the information.
        Parameters:
        message -
        params -
        Returns:
        the parsed message
        Throws:
        ParseException
      • parse

        S parse​(InputStream message,
                Object... params)
         throws IOException
        Parses a message and returns an internal representation of the information.
        Parameters:
        message -
        params -
        Returns:
        the parsed message
        Throws:
        IOException - if reading from stream fails
        ParseException
      • parse

        S parse​(Source source,
                Object... params)
         throws IOException
        Parses a message and returns an internal representation of the information.
        Parameters:
        source -
        params -
        Returns:
        the parsed message
        Throws:
        IOException - if reading from stream fails
        ParseException
      • parse

        S parse​(Reader reader,
                Object... params)
         throws IOException
        Parses a message and returns an internal representation of the information.
        Parameters:
        params -
        Returns:
        the parsed message
        Throws:
        IOException - if reading from stream fails
        ParseException