/** * Constructor that initializes default configuration values from the * System.properties map. */ public Config() { loadSystemAndDefaults(); }
/** * Constructor for subclasses who want a copy of the parent config but without * the ability to modify the original values. * * This constructor will not re-read the file, but it will copy the location * so if a child wants to reload the properties periodically, they may do so * @param parent Parent configuration object to load from */ public Config(final Config parent) { properties.putAll(parent.properties); config_location = parent.config_location; loadSystemAndDefaults(); }
/** * Constructor that initializes default values and attempts to load the given * properties file * @param file Path to the file to load * @throws IOException Thrown if unable to read or parse the file */ public Config(final String file) throws IOException { loadSystemAndDefaults(); loadConfig(file); }