Class PropertyListConfiguration

    • Constructor Detail

      • PropertyListConfiguration

        public PropertyListConfiguration()
        Creates an empty PropertyListConfiguration object which can be used to synthesize a new plist file by adding values and then saving().
      • PropertyListConfiguration

        public PropertyListConfiguration​(HierarchicalConfiguration c)
        Creates a new instance of PropertyListConfiguration and copies the content of the specified configuration into this object.
        Parameters:
        c - the configuration to copy
        Since:
        1.4
      • PropertyListConfiguration

        public PropertyListConfiguration​(java.lang.String fileName)
                                  throws ConfigurationException
        Creates and loads the property list from the specified file.
        Parameters:
        fileName - The name of the plist file to load.
        Throws:
        ConfigurationException - Error while loading the plist file
      • PropertyListConfiguration

        public PropertyListConfiguration​(java.io.File file)
                                  throws ConfigurationException
        Creates and loads the property list from the specified file.
        Parameters:
        file - The plist file to load.
        Throws:
        ConfigurationException - Error while loading the plist file
      • PropertyListConfiguration

        public PropertyListConfiguration​(java.net.URL url)
                                  throws ConfigurationException
        Creates and loads the property list from the specified URL.
        Parameters:
        url - The location of the plist file to load.
        Throws:
        ConfigurationException - Error while loading the plist file
    • Method Detail

      • addProperty

        public void addProperty​(java.lang.String key,
                                java.lang.Object value)
        Description copied from interface: Configuration
        Add a property to the configuration. If it already exists then the value stated here will be added to the configuration entry. For example, if the property:
        resource.loader = file
        is already present in the configuration and you call
        addProperty("resource.loader", "classpath")
        Then you will end up with a List like the following:
        ["file", "classpath"]
        Specified by:
        addProperty in interface Configuration
        Overrides:
        addProperty in class AbstractConfiguration
        Parameters:
        key - The key to add the property to.
        value - The value to add.