PropertySources interface.
Allows manipulation of contained property sources and provides a constructor
for copying an existing PropertySources instance.
Where precedence is mentioned in methods such as addFirst
and addLast, this is with regard to the order in which property sources
will be searched when resolving a given property with a PropertyResolver.
PropertySourcesPropertyResolver
| Modifier and Type | Field and Description |
|---|---|
| private final List |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MutablePropertySources(PropertySources propertySources)
Create a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | addAfter(String relativePropertySourceName, PropertySource<?> propertySource)
Add the given property source object with precedence immediately lower than the named relative property source. |
| private void | addAtIndex(int index, PropertySource<?> propertySource)
Add the given property source at a particular index in the list. |
| public void | addBefore(String relativePropertySourceName, PropertySource<?> propertySource)
Add the given property source object with precedence immediately higher than the named relative property source. |
| public void | addFirst(PropertySource<?> propertySource)
Add the given property source object with the highest precedence. |
| public void | addLast(PropertySource<?> propertySource)
Add the given property source object with the lowest precedence. |
| protected void | assertLegalRelativeAddition(String relativePropertySourceName, PropertySource<?> propertySource)
Ensure that the given property source is not being added relative to itself. |
| private int | assertPresentAndGetIndex(String
name of the property source to find name)Assert that the named property source is present and return its index. |
| public boolean | contains(String
the name of the property source to find name)Implements org. |
| public PropertySource | get(String
the name of the property source to find name)Implements org. null if not found.
|
| public Iterator | |
| public int | precedenceOf(PropertySource<?> propertySource)
Return the precedence of the given property source, |
| public PropertySource | |
| protected void | |
| public void | replace(String
the name of the property source to find and replace name, PropertySource<?> the replacement property source propertySource)Replace the property source with the given name with the given property source object. |
| public int | |
| public Spliterator | spliterator()
Overrides default java. Spliterator over the elements described by this
Iterable.
|
| public Stream | stream()
Overrides default org. Stream containing the property sources.
|
| public String |
| propertySourceList | back to summary |
|---|---|
| private final List<PropertySource<?>> propertySourceList | |
| MutablePropertySources | back to summary |
|---|---|
| public MutablePropertySources() Create a new | |
| MutablePropertySources | back to summary |
|---|---|
| public MutablePropertySources(PropertySources propertySources) Create a new | |
| addAfter | back to summary |
|---|---|
| public void addAfter(String relativePropertySourceName, PropertySource<?> propertySource) Add the given property source object with precedence immediately lower than the named relative property source. | |
| addAtIndex | back to summary |
|---|---|
| private void addAtIndex(int index, PropertySource<?> propertySource) Add the given property source at a particular index in the list. | |
| addBefore | back to summary |
|---|---|
| public void addBefore(String relativePropertySourceName, PropertySource<?> propertySource) Add the given property source object with precedence immediately higher than the named relative property source. | |
| addFirst | back to summary |
|---|---|
| public void addFirst(PropertySource<?> propertySource) Add the given property source object with the highest precedence. | |
| addLast | back to summary |
|---|---|
| public void addLast(PropertySource<?> propertySource) Add the given property source object with the lowest precedence. | |
| assertLegalRelativeAddition | back to summary |
|---|---|
| protected void assertLegalRelativeAddition(String relativePropertySourceName, PropertySource<?> propertySource) Ensure that the given property source is not being added relative to itself. | |
| assertPresentAndGetIndex | back to summary |
|---|---|
| private int assertPresentAndGetIndex(String name) Assert that the named property source is present and return its index.
| |
| contains | back to summary |
|---|---|
| public boolean contains(String name) Implements org. Doc from org. Return whether a property source with the given name is contained.
| |
| get | back to summary |
|---|---|
| public PropertySource Implements org. Doc from org. Return the property source with the given name,
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type
| |
| precedenceOf | back to summary |
|---|---|
| public int precedenceOf(PropertySource<?> propertySource) Return the precedence of the given property source, | |
| remove | back to summary |
|---|---|
| public PropertySource Remove and return the property source with the given name, | |
| removeIfPresent | back to summary |
|---|---|
| protected void removeIfPresent(PropertySource<?> propertySource) Remove the given property source if it is present. | |
| replace | back to summary |
|---|---|
| public void replace(String name, PropertySource<?> propertySource) Replace the property source with the given name with the given property source object.
| |
| size | back to summary |
|---|---|
| public int size() Return the number of | |
| spliterator | back to summary |
|---|---|
| public Spliterator Overrides default java. Doc from java. Creates a
| |
| stream | back to summary |
|---|---|
| public Stream Overrides default org. Doc from org. Return a sequential
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |