Package io.micronaut.aot.core.config
Class DefaultConfiguration
java.lang.Object
io.micronaut.aot.core.config.DefaultConfiguration
- All Implemented Interfaces:
Configuration
An implementation of configuration which uses properties
as the backing store.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(String key) Returns true if the configuration contains an entry for the specified key.@NonNull Runtime
Returns the target runtime for optimizations.@NonNull String
mandatoryValue
(String key) Returns the value of the configuration for the requested key or fails if not available.<T> T
optionalValue
(String key, Function<Optional<String>, T> producer) Returns the value for the requested key.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.aot.core.Configuration
booleanValue, isFeatureEnabled, optionalString, stringList, stringList
-
Constructor Details
-
DefaultConfiguration
-
-
Method Details
-
containsKey
Returns true if the configuration contains an entry for the specified key.- Specified by:
containsKey
in interfaceConfiguration
- Parameters:
key
- the key to look for- Returns:
- true if the configuration contains an entry for the key
-
mandatoryValue
Description copied from interface:Configuration
Returns the value of the configuration for the requested key or fails if not available.- Specified by:
mandatoryValue
in interfaceConfiguration
- Parameters:
key
- the key to look for- Returns:
- the value for the requested key
-
optionalValue
Description copied from interface:Configuration
Returns the value for the requested key.- Specified by:
optionalValue
in interfaceConfiguration
- Type Parameters:
T
- the type of the return value- Parameters:
key
- the configuration keyproducer
- a function called to generate a transformed value- Returns:
- a configured value
-
getRuntime
Description copied from interface:Configuration
Returns the target runtime for optimizations.- Specified by:
getRuntime
in interfaceConfiguration
- Returns:
- the target runtime
-