/** * Returns the date format specified by the user in the DATE_FORMAT_KEY * property, or the default format otherwise. * * @return the default date format */ private String getDefaultDateFormat() { return getString(DATE_FORMAT_KEY, DEFAULT_DATE_FORMAT); }
public static String getString(String key, String defaultValue) { logAccess(key, defaultValue); return config.getString(key, defaultValue); }
/** * Returns a new instance of the class whose name associated with the given configuration key. * The default constructor will be used. */ public static Object getNewObject(String key, String defaultValue) { logAccess(key, defaultValue); String className = config.getString(key, defaultValue); // It is not unusual for someone to want no object if the key does not exist. if (className == null) { return null; } return Reflection.newObject(className); }