org.springframework.core.env
Class PropertySourcesPropertyResolver

java.lang.Object
  extended by org.springframework.core.env.AbstractPropertyResolver
      extended by org.springframework.core.env.PropertySourcesPropertyResolver
All Implemented Interfaces:
ConfigurablePropertyResolver, PropertyResolver

public class PropertySourcesPropertyResolver
extends AbstractPropertyResolver

PropertyResolver implementation that resolves property values against an underlying set of PropertySources.

Since:
3.1
Author:
Chris Beams

Field Summary
 
Fields inherited from class org.springframework.core.env.AbstractPropertyResolver
conversionService, logger
 
Constructor Summary
PropertySourcesPropertyResolver(PropertySources propertySources)
          Create a new resolver against the given property sources.
 
Method Summary
 boolean containsProperty(String key)
          Return whether the given property key is available for resolution.
 String getProperty(String key)
          Return the property value associated with the given key.
<T> T
getProperty(String key, Class<T> targetValueType)
          Return the property value associated with the given key, or null if the key cannot be resolved.
 
Methods inherited from class org.springframework.core.env.AbstractPropertyResolver
getConversionService, getRequiredProperty, getRequiredProperty, resolvePlaceholders, resolveRequiredPlaceholders, setConversionService, setPlaceholderPrefix, setPlaceholderSuffix, setValueSeparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySourcesPropertyResolver

public PropertySourcesPropertyResolver(PropertySources propertySources)
Create a new resolver against the given property sources.

Parameters:
propertySources - the set of PropertySource objects to use
Method Detail

containsProperty

public boolean containsProperty(String key)
Description copied from interface: PropertyResolver
Return whether the given property key is available for resolution.


getProperty

public String getProperty(String key)
Description copied from interface: PropertyResolver
Return the property value associated with the given key.

See Also:
PropertyResolver.getProperty(String, Class)

getProperty

public <T> T getProperty(String key,
                         Class<T> targetValueType)
Description copied from interface: PropertyResolver
Return the property value associated with the given key, or null if the key cannot be resolved.