static class PropertySource.ComparisonPropertySource extends PropertySource.StubPropertySource
PropertySource.named(String)
PropertySource.ComparisonPropertySource, PropertySource.StubPropertySource
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
USAGE_ERROR |
logger, name, source
Constructor and Description |
---|
ComparisonPropertySource(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsProperty(java.lang.String name)
Return whether this
PropertySource contains the given name. |
java.lang.String |
getProperty(java.lang.String name)
Always returns
null . |
java.lang.Object |
getSource()
Return the underlying source object for this
PropertySource . |
private static final java.lang.String USAGE_ERROR
public java.lang.Object getSource()
PropertySource
PropertySource
.getSource
in class PropertySource<java.lang.Object>
public boolean containsProperty(java.lang.String name)
PropertySource
PropertySource
contains the given name.
This implementation simply checks for a null
return value
from PropertySource.getProperty(String)
. Subclasses may wish to implement
a more efficient algorithm if possible.
containsProperty
in class PropertySource<java.lang.Object>
name
- the property name to find@Nullable public java.lang.String getProperty(java.lang.String name)
PropertySource.StubPropertySource
null
.getProperty
in class PropertySource.StubPropertySource
name
- the property to findPropertyResolver.getRequiredProperty(String)