Class VaadinPreferences


public final class VaadinPreferences extends AbstractPreferences
A java.util.prefs.Preferences node backed by the browser's localStorage — the web-faithful analog of Swing's machine-local preferences store (Windows registry / ~/.java/.userPrefs/ / macOS plist). Selected JVM-wide by VaadinPreferencesFactory through the standard PreferencesFactory SPI, so migrated code keeps calling Preferences.userNodeForPackage(...) unchanged. See D_preferences.

Extending AbstractPreferences means the tree walk, keys()/childrenNames()/node(path)/removeNode(), and the PreferenceChangeListener/NodeChangeListener fan-out all come from the JDK. This class implements only the nine backing *Spi methods, delegating storage to the per-UI PrefsCache.

The class is public only so tests and diagnostics can name the type; every constructor is non-public, so user code cannot instantiate a node directly (it obtains nodes via Preferences.userRoot() et al.).

Change listeners fire for local mutations (this UI) via AbstractPreferences; a mutation in another browser tab does not fire here — the documented multi-tab gap (D_preferences).