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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ConfigFormat<C>getFormat()default voidparse(java.io.File file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction)Parses a configuration with the UTF-8 charset.default voidparse(java.io.File file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction, java.nio.charset.Charset charset)Parses a configuration.default Cparse(java.io.File file, FileNotFoundAction nefAction)Parses a configuration with the UTF-8 charset.default Cparse(java.io.File file, FileNotFoundAction nefAction, java.nio.charset.Charset charset)Parses a configuration.default Cparse(java.io.InputStream input)Parses a configuration with the UTF-8 charset.default voidparse(java.io.InputStream input, Config destination, ParsingMode parsingMode)Parses a configuration with the UTF-8 charset.default voidparse(java.io.InputStream input, Config destination, ParsingMode parsingMode, java.nio.charset.Charset charset)Parses a configuration.default Cparse(java.io.InputStream input, java.nio.charset.Charset charset)Parses a configuration.Cparse(java.io.Reader reader)Parses a configuration.voidparse(java.io.Reader reader, Config destination, ParsingMode parsingMode)Parses a configuration.default Cparse(java.lang.String input)Parses a configuration String.default voidparse(java.lang.String input, Config destination, ParsingMode parsingMode)Parses a configuration String.default Cparse(java.net.URL url)Parses a configuration.default voidparse(java.net.URL url, Config destination, ParsingMode parsingMode)Parses a configuration.default voidparse(java.nio.file.Path file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction)Parses a configuration with the UTF-8 charset.default voidparse(java.nio.file.Path file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction, java.nio.charset.Charset charset)Parses a configuration.default Cparse(java.nio.file.Path file, FileNotFoundAction nefAction)Parses a configuration with the UTF-8 charset.default Cparse(java.nio.file.Path file, FileNotFoundAction nefAction, java.nio.charset.Charset charset)Parses a configuration.
-
-
-
Method Detail
-
getFormat
ConfigFormat<C> getFormat()
- Returns:
- the format supported by this parser
-
parse
C parse(java.io.Reader reader)
Parses a configuration.- Parameters:
reader- the reader to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
void parse(java.io.Reader reader, Config destination, ParsingMode parsingMode)Parses a configuration.- Parameters:
reader- the reader to parsedestination- the config where to put the data
-
parse
default C parse(java.lang.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(java.lang.String input, Config destination, ParsingMode parsingMode)Parses a configuration String.- Parameters:
input- the input to parsedestination- the config where to put the data- Throws:
ParsingException- if an error occurs
-
parse
default C parse(java.io.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(java.io.InputStream input, java.nio.charset.Charset charset)
Parses a configuration.- Parameters:
input- the input to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
default void parse(java.io.InputStream input, Config destination, ParsingMode parsingMode)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
default void parse(java.io.InputStream input, Config destination, ParsingMode parsingMode, java.nio.charset.Charset charset)Parses a configuration.- Parameters:
input- the input to parsedestination- the config where to put the data- Throws:
ParsingException- if an error occurs
-
parse
default C parse(java.io.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(java.io.File file, FileNotFoundAction nefAction, java.nio.charset.Charset charset)
Parses a configuration.- Parameters:
file- the file to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
default void parse(java.io.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(java.io.File file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction, java.nio.charset.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
default C parse(java.nio.file.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(java.nio.file.Path file, FileNotFoundAction nefAction, java.nio.charset.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(java.nio.file.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(java.nio.file.Path file, Config destination, ParsingMode parsingMode, FileNotFoundAction nefAction, java.nio.charset.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
default C parse(java.net.URL url)
Parses a configuration.- Parameters:
url- the url to parse- Returns:
- a Config
- Throws:
ParsingException- if an error occurs
-
parse
default void parse(java.net.URL url, Config destination, ParsingMode parsingMode)Parses a configuration.- Parameters:
url- the url to parsedestination- the config where to put the data- Throws:
ParsingException- if an error occurs
-
-