org.springframework.core.env
Class EnumerablePropertySource<T>

java.lang.Object
  extended by org.springframework.core.env.PropertySource<T>
      extended by org.springframework.core.env.EnumerablePropertySource<T>
Direct Known Subclasses:
MapPropertySource, PortletConfigPropertySource, PortletContextPropertySource, ServletConfigPropertySource, ServletContextPropertySource

public abstract class EnumerablePropertySource<T>
extends PropertySource<T>

TODO SPR-7508: document

Since:
3.1
Author:
Chris Beams

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.core.env.PropertySource
PropertySource.StubPropertySource
 
Field Summary
protected static String[] EMPTY_NAMES_ARRAY
           
 
Fields inherited from class org.springframework.core.env.PropertySource
logger, name, source
 
Constructor Summary
EnumerablePropertySource(String name, T source)
           
 
Method Summary
 boolean containsProperty(String name)
          Return whether this PropertySource contains the given key.
abstract  String[] getPropertyNames()
          Return the names of all properties contained by the source object (never null).
 
Methods inherited from class org.springframework.core.env.PropertySource
equals, getName, getProperty, getSource, hashCode, named, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_NAMES_ARRAY

protected static final String[] EMPTY_NAMES_ARRAY
Constructor Detail

EnumerablePropertySource

public EnumerablePropertySource(String name,
                                T source)
Method Detail

getPropertyNames

public abstract String[] getPropertyNames()
Return the names of all properties contained by the source object (never null).


containsProperty

public boolean containsProperty(String name)
Return whether this PropertySource contains the given key.

This implementation checks for the presence of the given key within the getPropertyNames() array.

Overrides:
containsProperty in class PropertySource<T>
Parameters:
key - the property key to find