Package io.micronaut.core.util
Class EnvironmentProperties
java.lang.Object
io.micronaut.core.util.EnvironmentProperties
A mapping from environment variable names to Micronaut
 property names. Those can be precomputed, or computed
 on-the-fly when missing.
- Since:
- 3.2.0
- 
Method SummaryModifier and TypeMethodDescriptionasMap()Returns an immutable view of the environment variable names to Micronaut property names cache.static EnvironmentPropertiesempty()Creates a new empty cache of environment variable names to Micronaut properties cache.Returns, for an environment variable, the list of deduced Micronaut property names.static EnvironmentPropertiesfork(EnvironmentProperties delegate) Creates a new environment properties cache which delegates queries to the delegate, but will cache values into its own cache when they are missing.static EnvironmentPropertiesCreates a new environment to property names cache with the supplied set of precomputed values.
- 
Method Details- 
ofCreates a new environment to property names cache with the supplied set of precomputed values.- Parameters:
- preComputed- a map from environment variable name to Micronaut property names
- Returns:
- an environment properties cache
 
- 
asMapReturns an immutable view of the environment variable names to Micronaut property names cache.- Returns:
- the current state of the cache
 
- 
forkCreates a new environment properties cache which delegates queries to the delegate, but will cache values into its own cache when they are missing.- Parameters:
- delegate- the delegate
- Returns:
- a new environment properties cache
 
- 
emptyCreates a new empty cache of environment variable names to Micronaut properties cache.- Returns:
- an empty cache
 
- 
findPropertyNamesForEnvironmentVariableReturns, for an environment variable, the list of deduced Micronaut property names. The list is cached, so any further requests are guaranteed to return in constant time.- Parameters:
- env- the name of the environment variable
- Returns:
- the list of deduced Micronaut property names
 
 
-