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
-
Method Summary
Modifier and TypeMethodDescription<V> boolean
Checks if this value type can be handled by this preference store.<V> V
load
(PreferenceMetadata<V> preference) Loads the value of specified preference from an enclosed storage.<V> void
save
(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:IPreferenceMetadataStore
Checks if this value type can be handled by this preference store.- Specified by:
handles
in 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:IPreferenceMetadataStore
Loads the value of specified preference from an enclosed storage. If the value is not found returns the preference default value.- Specified by:
load
in 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:IPreferenceMetadataStore
Saves the value of specified preference to the enclosed storage.- Specified by:
save
in 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:
-