Groovy Documentation

griffon.plugins.preferences
[Java] Interface PreferencesManager


public interface PreferencesManager
extends ApplicationHandler

Authors:
Andres Almiray


Method Summary
Preferences getPreferences()

Returns the Preferences instance contained by this manager.

void save(Object instance)

 
Methods inherited from interface ApplicationHandler
getApp
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Method Detail

getPreferences

public Preferences getPreferences()
Returns the Preferences instance contained by this manager.

Never returns null.
Returns:
the Preferences instance contained by this manager.


save

public void save(Object instance)

Merges all fields/properties annotated with @Preference to their corresponding PreferencesNode within the contained Preferences.

Values will be transformed their literal representation if a format is present in their @Preference annotation. Null values will cause the removal of the key in the PreferencesNode.

Parameters:
instance - an object with fields/properties annotated with @Preference.


 

Groovy Documentation