Class PropertiesHolder


  • public class PropertiesHolder
    extends java.lang.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.
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertiesHolder​(java.lang.String propertiesFileName)
      Creates a new PropertiesHolder instance given a property file name.
      PropertiesHolder​(java.util.Properties properties)
      Creates a new PropertiesHolder instance given an already load Properties set.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Properties getProperties​(SPInterface<?> spi, ClassLoaders loaders)
      Returns the Properties instance, loaded if necessary from propertiesFileName.
      java.lang.String getPropertiesFileName()
      Returns the property file name
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropertiesHolder

        public PropertiesHolder​(java.util.Properties properties)
        Creates a new PropertiesHolder instance given an already load Properties set.
        Parameters:
        properties - The already load Properties set
      • PropertiesHolder

        public PropertiesHolder​(java.lang.String propertiesFileName)
        Creates a new PropertiesHolder instance given a property file name.
        Parameters:
        propertiesFileName - The property file name
    • Method Detail

      • getProperties

        public java.util.Properties getProperties​(SPInterface<?> spi,
                                                  ClassLoaders loaders)
        Returns the Properties instance, loaded if necessary from propertiesFileName.
        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:
        The Properties, loaded if necessary.
      • getPropertiesFileName

        public java.lang.String getPropertiesFileName()
        Returns the property file name
        Returns:
        The property file name