public final class PropertiesConfigurationSource extends AbstractConfigurationSource
ConfigurationSource
for the source of type Properties
.
A property whose value is a sequence (ex: list, set) of objects must be delimited by a comma (,).
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PRIORITY |
Modifier and Type | Method and Description |
---|---|
static PropertiesConfigurationSource |
create(Reader reader)
Creates an instance of
PropertiesConfigurationSource . |
static PropertiesConfigurationSource |
create(Reader reader,
int priority)
Creates an instance of
PropertiesConfigurationSource . |
org.apache.commons.configuration2.Configuration |
getConfig()
Returns the Configuration from the ConfigurationSource.
|
int |
getPriority()
Returns the priority of the current ConfigurationSources among other ConfigurationSources.
|
compareTo, equals, hashCode
public static final int DEFAULT_PRIORITY
public static PropertiesConfigurationSource create(Reader reader) throws org.apache.commons.configuration2.ex.ConfigurationException, IOException
PropertiesConfigurationSource
.org.apache.commons.configuration2.ex.ConfigurationException
- if failed to create the PropertiesConfiguration
IOException
- if failed to read from reader
.public static PropertiesConfigurationSource create(Reader reader, int priority) throws org.apache.commons.configuration2.ex.ConfigurationException, IOException
PropertiesConfigurationSource
.org.apache.commons.configuration2.ex.ConfigurationException
- if failed to create the PropertiesConfiguration
IOException
- if failed to read from reader
.public org.apache.commons.configuration2.Configuration getConfig()
ConfigurationSource
Configuration
object.public int getPriority()
ConfigurationSource
The return value signifies the natural ordering of the instances. Greater Value implies higher priority. Higher Priority ConfigurationSources overrides any matching properties from the lower priority ConfigurationSources.
The priority on a ConfigurationSource
must not be negative.
Copyright © 2020 Cerner Innovation, Inc.. All rights reserved.