public class PropertiesHolder extends Object
Constructor and Description |
---|
PropertiesHolder(Properties properties)
Creates a new
PropertiesHolder instance given an
already load Properties set. |
PropertiesHolder(String propertiesFileName)
Creates a new
PropertiesHolder instance given a
property file name. |
Modifier and Type | Method and Description |
---|---|
Properties |
getProperties(SPInterface<?> spi,
ClassLoaders loaders)
Returns the
Properties instance, loaded if necessary from propertiesFileName . |
String |
getPropertiesFileName()
Returns the property file name
|
public PropertiesHolder(Properties properties)
PropertiesHolder
instance given an
already load Properties
set.properties
- The already load Properties
setpublic PropertiesHolder(String propertiesFileName)
PropertiesHolder
instance given a
property file name.propertiesFileName
- The property file namepublic Properties getProperties(SPInterface<?> spi, ClassLoaders loaders)
Properties
instance, loaded if necessary from propertiesFileName
.spi
- Optional SPI (may be null).
If provided, an attempt is made to load the
property file as-per Class.getResource().loaders
- Used only if properties need to be loaded.Properties
, loaded if necessary.public String getPropertiesFileName()
Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.