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. |
java.lang.String |
toString()
Produce concise output (type and name) if the current log level does not include
debug.
|
equals, getName, hashCode, namedprivate static final java.lang.String USAGE_ERROR
public java.lang.Object getSource()
PropertySourcePropertySource.getSource in class PropertySource<java.lang.Object>public boolean containsProperty(java.lang.String name)
PropertySourcePropertySource 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 findpublic java.lang.String getProperty(java.lang.String name)
PropertySource.StubPropertySourcenull.getProperty in class PropertySource.StubPropertySourcename - the property to findPropertyResolver.getRequiredProperty(String)public java.lang.String toString()
PropertySourceThis variable verbosity is useful as a property source such as system properties or environment variables may contain an arbitrary number of property pairs, potentially leading to difficult to read exception and log messages.
toString in class PropertySource<java.lang.Object>Log#isDebugEnabled()