public final class ConfigParser extends Object
| Constructor and Description |
|---|
ConfigParser()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyToConfig(Config config)
Copies the values from the handler into the config.
|
static Config |
create(File configFile)
Creates an object from a XML configuration file.
|
static Config |
create(URL configFileURL)
Creates an object from a XML configuration file.
|
static void |
parse(Config config,
File configFile)
Fills an object from an XML configuration file.
|
static void |
parse(Config config,
URL configFileURL)
Fills an object from an XML configuration file.
|
void |
parse(URL url)
Starts the parsing process.
|
void |
put(Config config,
String key,
String value)
Set a property in the configuration by it's name.
|
public void parse(URL url) throws InvalidConfigException
url - URL of the XML configuration file.InvalidConfigException - Error parsing the configuration.public void copyToConfig(Config config) throws InvalidConfigException
config - Configuration to use.InvalidConfigException - Error copying the values.public final void put(Config config, String key, String value)
config - Configuration to populate.key - Name of the property.value - Value of the property.public static void parse(Config config, File configFile) throws InvalidConfigException
config - Configuration to populate.configFile - Configuration file.InvalidConfigException - Error reading the file.public static void parse(Config config, URL configFileURL) throws InvalidConfigException
config - Configuration to populate.configFileURL - URL of the configuration file.InvalidConfigException - Error reading the file.public static Config create(URL configFileURL) throws InvalidConfigException
configFileURL - URL of the configuration file.InvalidConfigException - Error reading the file.public static Config create(File configFile) throws InvalidConfigException
configFile - Configuration file.InvalidConfigException - Error reading the file.Copyright © 2013 Future Invent Informationsmanagement GmbH, Hamburg (Germany). All Rights Reserved.