Class PropertySourceOrigin
java.lang.Object
org.springframework.boot.origin.PropertySourceOrigin
- All Implemented Interfaces:
- Origin, OriginProvider
Origin from a PropertySource.- Since:
- 2.0.0
- Author:
- Phillip Webb
- 
Constructor SummaryConstructorsConstructorDescriptionPropertySourceOrigin(PropertySource<?> propertySource, String propertyName) Create a newPropertySourceOrigininstance.PropertySourceOrigin(PropertySource<?> propertySource, String propertyName, @Nullable Origin origin) Create a newPropertySourceOrigininstance.
- 
Method SummaryModifier and TypeMethodDescriptionstatic Originget(PropertySource<?> propertySource, String name) @Nullable OriginReturn the actual origin for the source if known.@Nullable OriginReturn the parent origin for this instance if there is one.Return the property name that was used when obtaining the original value from theproperty source.Return the originPropertySource.toString()
- 
Constructor Details- 
PropertySourceOriginCreate a newPropertySourceOrigininstance.- Parameters:
- propertySource- the property source
- propertyName- the name from the property source
 
- 
PropertySourceOriginpublic PropertySourceOrigin(PropertySource<?> propertySource, String propertyName, @Nullable Origin origin) Create a newPropertySourceOrigininstance.- Parameters:
- propertySource- the property source
- propertyName- the name from the property source
- origin- the actual origin for the source if known
- Since:
- 3.2.8
 
 
- 
- 
Method Details- 
getPropertySourceReturn the originPropertySource.- Returns:
- the origin property source
 
- 
getPropertyNameReturn the property name that was used when obtaining the original value from theproperty source.- Returns:
- the origin property name
 
- 
getOriginReturn the actual origin for the source if known.- Specified by:
- getOriginin interface- OriginProvider
- Returns:
- the actual source origin
- Since:
- 3.2.8
 
- 
getParent
- 
toString
- 
getGet anOriginfor the givenPropertySourceandpropertyName. Will either return anOriginLookupresult or aPropertySourceOrigin.- Parameters:
- propertySource- the origin property source
- name- the property name
- Returns:
- the property origin
 
 
-