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 ofPreferenceMetadata
using name as descriptionPreferenceMetadata(Class<V> clazz, String identifier, V defaultValue, String name, String description)
Created an instance ofPreferenceMetadata
of all the the given parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
defaultValue()
The default value for the preference.String
description()
Widely describes the preference purpose, intended to be used in UI.String
identifer()
The preference identifier to use as a key to access the preference value.String
name()
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 ofPreferenceMetadata
using name as description- Parameters:
clazz
- the value type of the preference, must not benull
identifier
- the identifier of the preference, must not benull
defaultValue
- the default value of the preference, must not benull
name
- 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 ofPreferenceMetadata
of all the the given parameters- Parameters:
clazz
- the value type of the preference, must not benull
identifier
- the identifier of the preference, must not benull
defaultValue
- the default value of the preference, must not benull
name
- the name of the preference, must not benull
description
- 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 benull
and 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 benull
and should be localized. May be blank.- Returns:
- the description
-
-