scijava/scijava-common — pull request #102 by hinerm (2014-07-21 20:10:47+00:00)
Title: Create Pref Service

Moves from a static utility `Prefs` class to a `PrefService` with default implementation.

All functionality is the same, running through `java.lang.prefs.Preferences`.
The `Prefs` class itself is retained but deprecated. It will delegate to a `PrefService` instead. Note that, because the `Prefs` class has no `Context` and lacks a nice way to obtain it, it will default to the `DefaultPrefService` until another service is set as the static `PrefService` of choice.
To facilitate this, the `AbstractPrefService` sets this static field.

As part of this patch, I also had to add `ModuleService` API to save/load `ModuleItem` values, as these were `Context`-less entities using the `Prefs` class.