public interface PropertySource extends Iterable<String>, Ordered
Iterable.iterator() method.| Modifier and Type | Interface and Description |
|---|---|
static class |
PropertySource.PropertyConvention
Property convention.
|
| Modifier and Type | Field and Description |
|---|---|
static 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 |
|---|---|
Object |
get(String key)
Get a property value of the given key.
|
default PropertySource.PropertyConvention |
getConvention() |
String |
getName() |
static PropertySource |
of(Map<String,Object> map)
Create a
PropertySource named Environment.DEFAULT_NAME from the given map. |
static PropertySource |
of(String name,
Map<String,Object> map)
Create a
PropertySource from the given map. |
static PropertySource |
of(String name,
Map<String,Object> map,
int priority)
Create a
PropertySource from the given map. |
static PropertySource |
of(String name,
Map<String,Object> map,
PropertySource.PropertyConvention convention)
Create a
PropertySource from the given map. |
forEach, iterator, spliteratorstatic final String CONTEXT
String getName()
Object get(String key)
key - The keydefault PropertySource.PropertyConvention getConvention()
static PropertySource of(String name, Map<String,Object> map)
PropertySource from the given map.name - The name of the property sourcemap - The mapPropertySourcestatic PropertySource of(String name, Map<String,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 sourcePropertySourcestatic PropertySource of(String name, Map<String,Object> map, int priority)
PropertySource from the given map.name - The name of the property sourcemap - The mappriority - The priority to order byPropertySourcestatic PropertySource of(Map<String,Object> map)
PropertySource named Environment.DEFAULT_NAME from the given map.map - The mapPropertySource