Spring Framework

org.springframework.web.context.support
Class ServletConfigPropertySource

java.lang.Object
  extended by org.springframework.core.env.PropertySource<T>
      extended by org.springframework.core.env.EnumerablePropertySource<javax.servlet.ServletConfig>
          extended by org.springframework.web.context.support.ServletConfigPropertySource

public class ServletConfigPropertySource
extends EnumerablePropertySource<javax.servlet.ServletConfig>

PropertySource that reads init parameters from a ServletConfig object.

Since:
3.1
Author:
Chris Beams
See Also:
ServletContextPropertySource

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.core.env.PropertySource
PropertySource.StubPropertySource
 
Field Summary
 
Fields inherited from class org.springframework.core.env.EnumerablePropertySource
EMPTY_NAMES_ARRAY, logger
 
Fields inherited from class org.springframework.core.env.PropertySource
name, source
 
Constructor Summary
ServletConfigPropertySource(java.lang.String name, javax.servlet.ServletConfig servletConfig)
           
 
Method Summary
 java.lang.String getProperty(java.lang.String name)
          Return the value associated with the given name, null if not found.
 java.lang.String[] getPropertyNames()
          Return the names of all properties contained by the source object (never null).
 
Methods inherited from class org.springframework.core.env.EnumerablePropertySource
containsProperty
 
Methods inherited from class org.springframework.core.env.PropertySource
equals, getName, getSource, hashCode, named, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServletConfigPropertySource

public ServletConfigPropertySource(java.lang.String name,
                                   javax.servlet.ServletConfig servletConfig)
Method Detail

getPropertyNames

public java.lang.String[] getPropertyNames()
Description copied from class: EnumerablePropertySource
Return the names of all properties contained by the source object (never null).

Specified by:
getPropertyNames in class EnumerablePropertySource<javax.servlet.ServletConfig>

getProperty

public java.lang.String getProperty(java.lang.String name)
Description copied from class: PropertySource
Return the value associated with the given name, null if not found.

Specified by:
getProperty in class PropertySource<javax.servlet.ServletConfig>
Parameters:
name - the property to find
See Also:
PropertyResolver.getRequiredProperty(String)

Spring Framework