Package ej.property

Class PropertyFactory


  • public class PropertyFactory
    extends java.lang.Object
    Gets a property loader that is able to retrieve properties.

    The property loader implementation is retrieved from system properties (see SystemPropertiesServiceLoader), if none is found, a SystemPropertyLoader is used.

    Usage:

     String propertyValue = PropertyFactory.getPropertyLoader().getProperty("myKey");
     

    The property registry implementation is retrieved from system properties (see SystemPropertiesServiceLoader), if none is found, a SimplePropertyRegistry is used.

    Usage:

     PropertyFactory.getPropertyRegistry().put("myKey", "myValue");
     
    • Method Detail

      • getPropertyLoader

        public static PropertyLoader getPropertyLoader()
        Gets a property loader unique instance.
        Returns:
        a property loader.
      • getPropertyRegistry

        public static PropertyRegistry getPropertyRegistry()
        Gets a property registry unique instance.
        Returns:
        a property registry.