Class OsgiPreferenceMetadataStore
java.lang.Object
org.eclipse.core.runtime.preferences.OsgiPreferenceMetadataStore
- All Implemented Interfaces:
IPreferenceMetadataStore
The preference store implementation that uses OSGi preference node as an
enclosed storage.
- Since:
- 3.8
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V> booleanChecks if this value type can be handled by this preference store.<V> Vload(PreferenceMetadata<V> preference) Loads the value of specified preference from an enclosed storage.<V> voidsave(V value, PreferenceMetadata<V> preference) Saves the value of specified preference to the enclosed storage.
-
Constructor Details
-
OsgiPreferenceMetadataStore
- Parameters:
preferences- the OSGi preference node, must not benull
-
-
Method Details
-
handles
Description copied from interface:IPreferenceMetadataStoreChecks if this value type can be handled by this preference store.- Specified by:
handlesin interfaceIPreferenceMetadataStore- Type Parameters:
V- the value type for the preference- Parameters:
valueType- the value type to be checked- Returns:
- true if this value type can be handled by this preference store and false otherwise
-
load
Description copied from interface:IPreferenceMetadataStoreLoads the value of specified preference from an enclosed storage. If the value is not found returns the preference default value.- Specified by:
loadin interfaceIPreferenceMetadataStore- Type Parameters:
V- the value type for the preference- Parameters:
preference- the preference metadata, must not benull.- Returns:
- the preference value or default value if preference is unknown
- See Also:
-
save
Description copied from interface:IPreferenceMetadataStoreSaves the value of specified preference to the enclosed storage.- Specified by:
savein interfaceIPreferenceMetadataStore- Type Parameters:
V- the value type for the preference- Parameters:
value- to be saved, must not benull.preference- the preference metadata, must not benull.- See Also:
-