Interface ConfigParser<C extends Config>

Type Parameters:
C - the type of config created by the parser

public interface ConfigParser<C extends Config>
Interface for reading configurations.
  • Method Details

    • getFormat

      ConfigFormat<C> getFormat()
      Returns:
      the format supported by this parser
    • parse

      C parse(Reader reader)
      Parses a configuration.
      Parameters:
      reader - the reader to parse
      Returns:
      a Config
      Throws:
      ParsingException - if an error occurs
    • parse

      void parse(Reader reader, Config destination, ParsingMode parsingMode)
      Parses a configuration.
      Parameters:
      reader - the reader to parse
      destination - the config where to put the data
    • parse

      default C parse(String input)
      Parses a configuration String.
      Parameters:
      input - the input to parse
      Returns:
      a Config
      Throws:
      ParsingException - if an error occurs
    • parse

      default void parse(String input, Config destination, ParsingMode parsingMode)
      Parses a configuration String.
      Parameters:
      input - the input to parse
      destination - the config where to put the data
      Throws:
      ParsingException - if an error occurs
    • parse

      default C parse(InputStream input)
      Parses a configuration with the UTF-8 charset.
      Parameters:
      input - the input to parse
      Returns:
      a Config
      Throws:
      ParsingException - if an error occurs
    • parse

      default C parse(InputStream input, Charset charset)
      Parses a configuration.
      Parameters:
      input - the input to parse
      Returns:
      a Config
      Throws:
      ParsingException - if an error occurs
    • parse

      default void parse(InputStream input, Config destination, ParsingMode parsingMode)
      Parses a configuration with the UTF-8 charset.
      Parameters:
      input - the input to parse
      destination - the config where to put the data
      Throws:
      ParsingException - if an error occurs
    • parse

      default void parse(InputStream input, Config destination, ParsingMode parsingMode, Charset charset)
      Parses a configuration.
      Parameters:
      input - the input to parse
      destination - the config where to put the data
      Throws:
      ParsingException - if an error occurs
    • parse

      default C parse(File file, FileNotFoundAction nefAction)
      Parses a configuration with the UTF-8 charset.
      Parameters:
      file - the file to parse
      Returns:
      a Config
      Throws:
      ParsingException - if an error occurs
    • parse

      default C parse(File file, FileNotFoundAction nefAction, Charset charset)
      Parses a configuration.
      Parameters:
      file - the file to parse
      Returns:
      a Config
      Throws:
      ParsingException - if an error occurs
    • parse

      default void parse(File file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction)
      Parses a configuration with the UTF-8 charset.
      Parameters:
      file - the file to parse
      destination - the config where to put the data
      Throws:
      ParsingException - if an error occurs
    • parse

      default void parse(File file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction, Charset charset)
      Parses a configuration.
      Parameters:
      file - the file to parse
      destination - the config where to put the data
      Throws:
      ParsingException - if an error occurs
    • parse

      default C parse(Path file, FileNotFoundAction nefAction)
      Parses a configuration with the UTF-8 charset.
      Parameters:
      file - the nio Path to parse
      Returns:
      a Config
      Throws:
      ParsingException - if an error occurs
    • parse

      default C parse(Path file, FileNotFoundAction nefAction, Charset charset)
      Parses a configuration.
      Parameters:
      file - the nio Path to parse
      Returns:
      a Config
      Throws:
      ParsingException - if an error occurs
    • parse

      default void parse(Path file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction)
      Parses a configuration with the UTF-8 charset.
      Parameters:
      file - the nio Path to parse
      destination - the config where to put the data
      Throws:
      ParsingException - if an error occurs
    • parse

      default void parse(Path file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction, Charset charset)
      Parses a configuration.
      Parameters:
      file - the nio Path to parse
      destination - the config where to put the data
      Throws:
      ParsingException - if an error occurs
    • parse

      default C parse(URL url)
      Parses a configuration.
      Parameters:
      url - the url to parse
      Returns:
      a Config
      Throws:
      ParsingException - if an error occurs
    • parse

      default void parse(URL url, Config destination, ParsingMode parsingMode)
      Parses a configuration.
      Parameters:
      url - the url to parse
      destination - the config where to put the data
      Throws:
      ParsingException - if an error occurs