public class MutablePropertySources extends ObjectSE implements PropertySources
PropertySources
インターフェースのデフォルト実装。含まれているプロパティソースの操作を許可し、既存の PropertySources
インスタンスをコピーするためのコンストラクターを提供します。addFirst(org.springframework.core.env.PropertySource<?>)
や addLast(org.springframework.core.env.PropertySource<?>)
などのメソッドで優先順位がメンションされている場合、これは、PropertyResolver
で特定のプロパティを解決するときにプロパティソースが検索される順序に関するものです。
PropertySourcesPropertyResolver
コンストラクターと説明 |
---|
MutablePropertySources() 新しい MutablePropertySources オブジェクトを作成します。 |
MutablePropertySources(PropertySources propertySources) 指定された propertySources オブジェクトから新しい MutablePropertySources を作成し、含まれている PropertySource オブジェクトの元の順序を維持します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | addAfter(StringSE relativePropertySourceName, PropertySource<?> propertySource) 指定されたプロパティソースオブジェクトを、名前付きの相対プロパティソースのすぐ下の優先順位で追加します。 |
void | addBefore(StringSE relativePropertySourceName, PropertySource<?> propertySource) 指定されたプロパティソースオブジェクトを、指定された相対プロパティソースのすぐ上の優先順位で追加します。 |
void | addFirst(PropertySource<?> propertySource) 指定されたプロパティソースオブジェクトを最高の優先順位で追加します。 |
void | addLast(PropertySource<?> propertySource) 優先順位が最も低い指定されたプロパティソースオブジェクトを追加します。 |
protected void | assertLegalRelativeAddition(StringSE relativePropertySourceName, PropertySource<?> propertySource) 指定されたプロパティソースがそれ自体に対して追加されていないことを確認してください。 |
boolean | contains(StringSE name) 指定された名前のプロパティソースが含まれているかどうかを返します。 |
PropertySource<?> | get(StringSE name) 指定された名前、 null が見つからない場合、プロパティソースを返します。 |
IteratorSE<PropertySource<?>> | iterator() |
int | precedenceOf(PropertySource<?> propertySource) 指定されたプロパティソースの優先順位を返します。見つからない場合は -1 を返します。 |
PropertySource<?> | remove(StringSE name) 指定された名前のプロパティソースを削除して返します。見つからない場合は null を返します。 |
protected void | removeIfPresent(PropertySource<?> propertySource) 指定されたプロパティソースが存在する場合は削除します。 |
void | replace(StringSE name, PropertySource<?> propertySource) 指定された名前のプロパティソースを指定されたプロパティソースオブジェクトに置き換えます。 |
int | size() 含まれる PropertySource オブジェクトの数を返します。 |
SpliteratorSE<PropertySource<?>> | spliterator() |
StreamSE<PropertySource<?>> | stream() プロパティソースを含むシーケンシャル Stream SE を返します。 |
StringSE | toString() |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
forEachSE
public MutablePropertySources()
MutablePropertySources
オブジェクトを作成します。public MutablePropertySources(PropertySources propertySources)
MutablePropertySources
を作成し、含まれている PropertySource
オブジェクトの元の順序を維持します。public IteratorSE<PropertySource<?>> iterator()
IterableSE<PropertySource<?>>
の iteratorSE
public SpliteratorSE<PropertySource<?>> spliterator()
IterableSE<PropertySource<?>>
の spliteratorSE
public StreamSE<PropertySource<?>> stream()
PropertySources
Stream
SE を返します。PropertySources
の stream
public boolean contains(StringSE name)
PropertySources
PropertySources
の contains
name
- 検索するプロパティソースの名前 @Nullable public PropertySource<?> get(StringSE name)
PropertySources
null
が見つからない場合、プロパティソースを返します。PropertySources
の get
name
- 検索するプロパティソースの名前 public void addFirst(PropertySource<?> propertySource)
public void addLast(PropertySource<?> propertySource)
public void addBefore(StringSE relativePropertySourceName, PropertySource<?> propertySource)
public void addAfter(StringSE relativePropertySourceName, PropertySource<?> propertySource)
public int precedenceOf(PropertySource<?> propertySource)
-1
を返します。@Nullable public PropertySource<?> remove(StringSE name)
null
を返します。name
- 検索して削除するプロパティソースの名前 public void replace(StringSE name, PropertySource<?> propertySource)
name
- 検索および置換するプロパティソースの名前 propertySource
- 置換プロパティソース IllegalArgumentExceptionSE
- 指定された名前のプロパティソースが存在しない場合 contains(java.lang.String)
public int size()
PropertySource
オブジェクトの数を返します。public StringSE toString()
ObjectSE
の toStringSE
protected void assertLegalRelativeAddition(StringSE relativePropertySourceName, PropertySource<?> propertySource)
protected void removeIfPresent(PropertySource<?> propertySource)