Interface ConfigurationParser
- All Known Implementing Classes:
ConfigurationParser.IniConfigurationParser,ConfigurationParser.XmlConfigurationParser
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ConfigurationParser
Parser for various configuration formats.
Supported formats:
- XML
- INI / Properties
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classConfigurationParser.IniConfigurationParserstatic classConfigurationParser.XmlConfigurationParser -
Method Summary
Modifier and Type Method Description static ConfigurationParserIni()Creates a newConfigurationParserwhich reads ini, or property files.static ConfigurationParserIni(ConfigurationPropertyParser propertyParser)Creates a newConfigurationParserwhich reads ini, or property files.default Configurationparse(String data)Parses the configuration from the given input.Configurationparse(Configuration configuration, String data)Parses the configuration from the given input.static ConfigurationParserXml()Creates a newConfigurationParserwhich reads xml files.static ConfigurationParserXml(ConfigurationPropertyParser propertyParser)Creates a newConfigurationParserwhich reads xml files.
-
Method Details
-
parse
Parses the configuration from the given input.- Parameters:
data- the input to parse- Returns:
- the parsed configuration
- Throws:
StorageConfigurationException- if an error occurs while parsing
-
parse
Parses the configuration from the given input.- Parameters:
configuration- the configuration to populatedata- the input to parse- Returns:
- the given configuration
- Throws:
StorageConfigurationException- if an error occurs while parsing
-
Ini
Creates a newConfigurationParserwhich reads ini, or property files. -
Ini
Creates a newConfigurationParserwhich reads ini, or property files.- Parameters:
propertyParser- a custom property parser
-
Xml
Creates a newConfigurationParserwhich reads xml files. -
Xml
Creates a newConfigurationParserwhich reads xml files.- Parameters:
propertyParser- a custom property parser
-