ucar.util.prefs.PreferencesExtFactory Maven / Gradle / Ivy
The newest version!
/*
* Copyright (c) 1998-2018 University Corporation for Atmospheric Research/Unidata
* See LICENSE for license information.
*/
package ucar.util.prefs;
/**
* Implementation of PreferencesFactory to return PreferencesExt objects. Using this
* method of obtaining a Preferences object is optional; you can also just pass around the
* Preferences object explicitly.
*
* The default Preferences.userRoot() and Preferences.systemRoot() are empty. To use
* persistent versions, you must set them explicitly through
*
* PreferencesExt.setSystemRoot( PreferencesExt prefs);
* PreferencesExt.setUserRoot( PreferencesExt prefs);
*
* and also call:
*
* System.setProperty("java.util.prefs.PreferencesFactory", "ucar.util.prefs.PreferencesExtFactory");
*
*
*/
public class PreferencesExtFactory implements java.util.prefs.PreferencesFactory {
public java.util.prefs.Preferences userRoot() {
return PreferencesExt.userRoot;
}
public java.util.prefs.Preferences systemRoot() {
return PreferencesExt.systemRoot;
}
}