/** * Creates a DefaultInternalConfiguration. The constructor is package protected as it is called from * {@link Config#getInstance()}; */ protected DefaultInternalConfiguration() { initialiseInstanceVariables(); load(); }
/** * {@inheritDoc} */ public void refresh() { synchronized (lockObject) { // Now reset this object back to its initial state. initialiseInstanceVariables(); // Load all the parameters from scratch. load(); // Finally, notify all the listeners that have registered with this object that a change in properties has // occurred. Config.notifyListeners(); } }
/** * Create an instance of DefaultInternalConfiguration, loading values from a resource named "resourceName". This * constructor is provided purely for testing purposes. Application code should always use the * {@link Config#getInstance()} method. * * @param resourceName the name of the resource to load (from the classloader, working or home directory) */ protected DefaultInternalConfiguration(final String resourceName) { initialiseInstanceVariables(); loadTop(resourceName); // Now perform variable substitution. do { } while (substitute()); }