Package org.tquadrat.foundation.config
Annotation Interface SystemPreference
@ClassVersion(sourceVersion="$Id: SystemPreference.java 942 2021-12-20 02:04:04Z tquadrat $")
@Documented
@Retention(CLASS)
@Target(METHOD)
@API(status=STABLE,
since="0.0.1")
public @interface SystemPreference
This annotation indicates that the property for the annotated
getter is initialised from a SYSTEM
Preferences value
with the path and name.
This annotation implies the
NoPreference
annotation.
- Notes:
-
- Even when no setter is defined for a property with this annotation
\u2013 making it effectively immutable \u2013 the field for it will not be
final
. This is because of the way the initialisation works. - Changes to the value of a property marked with this annotation will
not be reflected to the SYSTEM
Preferences
.
- Even when no setter is defined for a property with this annotation
\u2013 making it effectively immutable \u2013 the field for it will not be
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: SystemPreference.java 942 2021-12-20 02:04:04Z tquadrat $
- Since:
- 0.0.1
- See Also:
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionClass
<? extends PreferenceAccessor<?>> The implementation ofPreferenceAccessor
that is used to access thePreferences
and to translate the value into the type of the property.The key for theSYSTEM
preference value to read.The path for theSYSTEM
preference node that holds the value.
-
Element Details
-
key
The key for theSYSTEM
preference value to read.- Returns:
- The key for the
SYSTEM
preference.
-
path
The path for theSYSTEM
preference node that holds the value.- Returns:
- The path for the
SYSTEM
preference node.
-
accessor
The implementation of
PreferenceAccessor
that is used to access thePreferences
and to translate the value into the type of the property.This is mandatory, no default is used, nor will it be somehow inferred.
- Returns:
- The class for the preferences accessor.
-