Class PreferenceMetadata<V>
- java.lang.Object
-
- org.eclipse.core.runtime.preferences.PreferenceMetadata<V>
-
- Type Parameters:
V- the value type for the preference
public final class PreferenceMetadata<V> extends Object
The preference metadata provides the information needed to configure everything about the preference except the preference value itself.- Since:
- 3.8
- See Also:
IPreferenceMetadataStore
-
-
Constructor Summary
Constructors Constructor Description PreferenceMetadata(Class<V> clazz, String identifier, V defaultValue, String name)Created an instance ofPreferenceMetadatausing name as descriptionPreferenceMetadata(Class<V> clazz, String identifier, V defaultValue, String name, String description)Created an instance ofPreferenceMetadataof all the the given parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VdefaultValue()The default value for the preference.Stringdescription()Widely describes the preference purpose, intended to be used in UI.Stringidentifer()The preference identifier to use as a key to access the preference value.Stringname()Briefly describes the preference purpose, intended to be used in UI.Class<V>valueClass()The type of preference value needed to perform type checks.
-
-
-
Constructor Detail
-
PreferenceMetadata
public PreferenceMetadata(Class<V> clazz, String identifier, V defaultValue, String name)
Created an instance ofPreferenceMetadatausing name as description- Parameters:
clazz- the value type of the preference, must not benullidentifier- the identifier of the preference, must not benulldefaultValue- the default value of the preference, must not benullname- the name of the preference, must not benull- See Also:
PreferenceMetadata(Class, String, Object, String, String)
-
PreferenceMetadata
public PreferenceMetadata(Class<V> clazz, String identifier, V defaultValue, String name, String description)
Created an instance ofPreferenceMetadataof all the the given parameters- Parameters:
clazz- the value type of the preference, must not benullidentifier- the identifier of the preference, must not benulldefaultValue- the default value of the preference, must not benullname- the name of the preference, must not benulldescription- the description of the preference, must not benull- See Also:
PreferenceMetadata(Class, String, Object, String)
-
-
Method Detail
-
identifer
public String identifer()
The preference identifier to use as a key to access the preference value. Must not benull.- Returns:
- the identifier
-
defaultValue
public V defaultValue()
The default value for the preference. Must not benull.- Returns:
- the default value
-
name
public String name()
Briefly describes the preference purpose, intended to be used in UI. Must not benulland should be localized. Should not be blank.- Returns:
- the name
-
description
public String description()
Widely describes the preference purpose, intended to be used in UI. Must not benulland should be localized. May be blank.- Returns:
- the description
-
-