Class ConfigurationProperty
java.lang.Object
org.springframework.boot.context.properties.source.ConfigurationProperty
- All Implemented Interfaces:
Comparable<ConfigurationProperty>,OriginProvider
public final class ConfigurationProperty
extends Object
implements OriginProvider, Comparable<ConfigurationProperty>
A single configuration property obtained from a
ConfigurationPropertySource
consisting of a name, value and optional
origin.- Since:
- 2.0.0
- Author:
- Phillip Webb, Madhura Bhave
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationProperty(ConfigurationPropertyName name, Object value, Origin origin) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ConfigurationProperty other) booleangetName()Return the name of the configuration property.Return the source origin ornullif the origin is not known.Return theConfigurationPropertySourcethat provided the property ornullif the source is unknown.getValue()Return the value of the configuration property.inthashCode()toString()
-
Constructor Details
-
ConfigurationProperty
-
-
Method Details
-
getSource
Return theConfigurationPropertySourcethat provided the property ornullif the source is unknown.- Returns:
- the configuration property source
- Since:
- 2.6.0
-
getName
Return the name of the configuration property.- Returns:
- the configuration property name
-
getValue
Return the value of the configuration property.- Returns:
- the configuration property value
-
getOrigin
Description copied from interface:OriginProviderReturn the source origin ornullif the origin is not known.- Specified by:
getOriginin interfaceOriginProvider- Returns:
- the origin or
null
-
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<ConfigurationProperty>
-