Annotation Interface EnvironmentVariable
This annotation indicates that the property for the annotated getter is initialised from an environment variable with the given name.
The initialisation uses the default
StringConverter
for the type of the property if none is provided; if there is no default
String converter, an error is thrown during compile time.
Changing the configuration property value will not have an effect to the environment variable.
This annotation implies the
NoPreference
annotation.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: EnvironmentVariable.java 1120 2024-03-16 09:48:00Z tquadrat $
- Since:
- 0.0.1
- See Also:
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe default value for the environment variable.
-
Element Details
-
defaultValue
The default value for the environment variable. It will be used for the initialisation of the property if the environment variable is not set.
It is mandatory to provide a default value for primitive type properties.
The default setting is a String containing only a
NUL
; it will be treated as _null- Returns:
- The default value.
- Default:
"\u0000"
-
value
The name for the environment variable to read.- Returns:
- The name for the environment variable.
-