org.apache.commons.discovery.tools
Class PropertiesHolder

java.lang.Object
  extended by org.apache.commons.discovery.tools.PropertiesHolder

public class PropertiesHolder
extends Object

Holder for a default class. Class may be specified by name (String) or class (Class). Using the holder complicates the users job, but minimized # of API's.

Author:
Richard A. Sitze

Constructor Summary
PropertiesHolder(Properties properties)
           
PropertiesHolder(String propertiesFileName)
           
 
Method Summary
 Properties getProperties(SPInterface spi, ClassLoaders loaders)
           
 String getPropertiesFileName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesHolder

public PropertiesHolder(Properties properties)

PropertiesHolder

public PropertiesHolder(String propertiesFileName)
Method Detail

getProperties

public Properties getProperties(SPInterface spi,
                                ClassLoaders loaders)
Parameters:
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.
Returns:
Properties. Load the properties if necessary.

getPropertiesFileName

public String getPropertiesFileName()


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.