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 Summary
Modifier and TypeMethodDescriptiondefault voidparse(File file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction) Parses a configuration with the UTF-8 charset.default voidparse(File file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction, Charset charset) Parses a configuration.default Cparse(File file, FileNotFoundAction nefAction) Parses a configuration with the UTF-8 charset.default Cparse(File file, FileNotFoundAction nefAction, Charset charset) Parses a configuration.default Cparse(InputStream input) Parses a configuration with the UTF-8 charset.default voidparse(InputStream input, Config destination, ParsingMode parsingMode) Parses a configuration with the UTF-8 charset.default voidparse(InputStream input, Config destination, ParsingMode parsingMode, Charset charset) Parses a configuration.default Cparse(InputStream input, Charset charset) Parses a configuration.Parses a configuration.voidparse(Reader reader, Config destination, ParsingMode parsingMode) Parses a configuration.default CParses a configuration String.default voidparse(String input, Config destination, ParsingMode parsingMode) Parses a configuration String.default CParses a configuration.default voidparse(URL url, Config destination, ParsingMode parsingMode) Parses a configuration.default voidparse(Path file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction) Parses a configuration with the UTF-8 charset.default voidparse(Path file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction, Charset charset) Parses a configuration.default Cparse(Path file, FileNotFoundAction nefAction) Parses a configuration with the UTF-8 charset.default Cparse(Path file, FileNotFoundAction nefAction, Charset charset) Parses a configuration.
-
Method Details
-
getFormat
ConfigFormat<C> getFormat()- Returns:
- the format supported by this parser
-
parse
Parses a configuration.- Parameters:
reader- the reader to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
Parses a configuration.- Parameters:
reader- the reader to parsedestination- the config where to put the data
-
parse
Parses a configuration String.- Parameters:
input- the input to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
Parses a configuration String.- Parameters:
input- the input to parsedestination- the config where to put the data- Throws:
ParsingException- if an error occurs
-
parse
Parses a configuration with the UTF-8 charset.- Parameters:
input- the input to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
Parses a configuration.- Parameters:
input- the input to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
Parses a configuration with the UTF-8 charset.- Parameters:
input- the input to parsedestination- the config where to put the data- Throws:
ParsingException- if an error occurs
-
parse
Parses a configuration.- Parameters:
input- the input to parsedestination- the config where to put the data- Throws:
ParsingException- if an error occurs
-
parse
Parses a configuration with the UTF-8 charset.- Parameters:
file- the file to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
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 parsedestination- 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 parsedestination- the config where to put the data- Throws:
ParsingException- if an error occurs
-
parse
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
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 parsedestination- 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 parsedestination- the config where to put the data- Throws:
ParsingException- if an error occurs
-
parse
Parses a configuration.- Parameters:
url- the url to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
Parses a configuration.- Parameters:
url- the url to parsedestination- the config where to put the data- Throws:
ParsingException- if an error occurs
-