Package io.micronaut.context.env
Class MapPropertySource
java.lang.Object
io.micronaut.context.env.MapPropertySource
- All Implemented Interfaces:
PropertySource
,Ordered
,Iterable<String>
- Direct Known Subclasses:
CommandLinePropertySource
,EnvironmentPropertySource
,KubernetesEnvironmentPropertySource
,SystemPropertiesPropertySource
A
PropertySource
that uses a map.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.context.env.PropertySource
PropertySource.PropertyConvention
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Fields inherited from interface io.micronaut.context.env.PropertySource
CONTEXT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasMap()
The backing map (unmodifiable).Get a property value of the given key.getName()
iterator()
static MapPropertySource
Create a newMapPropertySource
from the given map.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.micronaut.context.env.PropertySource
getConvention
-
Constructor Details
-
MapPropertySource
Creates a map property source.- Parameters:
name
- The name of the property sourcemap
- The map
-
-
Method Details
-
getName
- Specified by:
getName
in interfacePropertySource
- Returns:
- The name of the property source
-
get
Description copied from interface:PropertySource
Get a property value of the given key.- Specified by:
get
in interfacePropertySource
- Parameters:
key
- The key- Returns:
- The value
-
iterator
-
asMap
The backing map (unmodifiable).- Returns:
- The backing map
-
of
Create a newMapPropertySource
from the given map.- Parameters:
name
- The name of the property sourcemap
- The map- Returns:
- The map property source
-
toString
-