M
Mark
I want to implement my own PreferencesFactory to serve requests for
java.util.prefs.Preferences by setting -
Djava.util.prefs.PreferencesFactory=foo.Bar, but I want to forward
some calls in my Preferences class onto WindowsPreferences (the
default in the Windows JRE).
Looking in the JRE sources I see that WindowsPreferences and
WindowsPreferencesFactory are package-private, and I can't use the
Preference factory methods witing foo.Bar (or I will just be calling
myself again).
So what is the best way of accessing the default preferences factory?
Is it as simple and ugly as temporarily resetting the relevant system
property from "foo.Bar" to "java.util.prefs.WindowsPreferencesFactory"
inside the methods of my new Preferences class?
Mark
java.util.prefs.Preferences by setting -
Djava.util.prefs.PreferencesFactory=foo.Bar, but I want to forward
some calls in my Preferences class onto WindowsPreferences (the
default in the Windows JRE).
Looking in the JRE sources I see that WindowsPreferences and
WindowsPreferencesFactory are package-private, and I can't use the
Preference factory methods witing foo.Bar (or I will just be calling
myself again).
So what is the best way of accessing the default preferences factory?
Is it as simple and ugly as temporarily resetting the relevant system
property from "foo.Bar" to "java.util.prefs.WindowsPreferencesFactory"
inside the methods of my new Preferences class?
Mark