public interface PropertySource extends java.lang.Iterable<java.lang.String>, Ordered
Iterable.iterator()
method.Modifier and Type | Interface and Description |
---|---|
static class |
PropertySource.PropertyConvention
Property convention.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEXT
The name of the property source with values supplied directly from the context.
|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.String key)
Get a property value of the given key.
|
default PropertySource.PropertyConvention |
getConvention() |
java.lang.String |
getName() |
static java.util.Map<java.lang.String,java.lang.Object> |
mapOf(java.lang.Object... values)
Create a
LinkedHashMap of configuration from an array of values. |
static PropertySource |
of(java.util.Map<java.lang.String,java.lang.Object> map)
Create a
PropertySource named Environment.DEFAULT_NAME from the given map. |
static PropertySource |
of(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> map)
Create a
PropertySource from the given map. |
static PropertySource |
of(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> map,
int priority)
Create a
PropertySource from the given map. |
static PropertySource |
of(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> map,
PropertySource.PropertyConvention convention)
Create a
PropertySource from the given map. |
static PropertySource |
of(java.lang.String name,
java.lang.Object... values)
Create a
PropertySource from the given map. |
static final java.lang.String CONTEXT
java.lang.String getName()
java.lang.Object get(java.lang.String key)
key
- The keydefault PropertySource.PropertyConvention getConvention()
static PropertySource of(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> map)
PropertySource
from the given map.name
- The name of the property sourcemap
- The mapPropertySource
static PropertySource of(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> map, PropertySource.PropertyConvention convention)
PropertySource
from the given map.name
- The name of the property sourcemap
- The mapconvention
- The convention type of the property sourcePropertySource
static PropertySource of(java.lang.String name, java.lang.Object... values)
PropertySource
from the given map.name
- The name of the property sourcevalues
- The values as an array of alternating key/value entriesPropertySource
static java.util.Map<java.lang.String,java.lang.Object> mapOf(java.lang.Object... values)
LinkedHashMap
of configuration from an array of values.values
- The valuesstatic PropertySource of(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> map, int priority)
PropertySource
from the given map.name
- The name of the property sourcemap
- The mappriority
- The priority to order byPropertySource
static PropertySource of(java.util.Map<java.lang.String,java.lang.Object> map)
PropertySource
named Environment.DEFAULT_NAME
from the given map.map
- The mapPropertySource