PropertySource.StubPropertySource (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.core.env

## Class PropertySource.StubPropertySource

- java.lang.Object
- - org.springframework.core.env.PropertySource<Object>
  - - org.springframework.core.env.PropertySource.StubPropertySource

- Enclosing class:
    PropertySource<T>

      public static class PropertySource.StubPropertySource
      extends PropertySource<Object>

  `PropertySource` to be used as a placeholder in cases where an actual property source cannot be eagerly initialized at application context creation time. For example, a `ServletContext`-based property source must wait until the `ServletContext` object is available to its enclosing `ApplicationContext`. In such cases, a stub should be used to hold the intended default position/order of the property source, then be replaced during context refresh.
  See Also:
    `AbstractApplicationContext.initPropertySources()`, `StandardServletEnvironment`, `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.PropertySource

      `logger, name, source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertySource.StubPropertySource(String name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getProperty(String name)` Always return `null`.

    - ### Methods inherited from class org.springframework.core.env.PropertySource

      `containsProperty, equals, getName, getSource, hashCode, named, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PropertySource.StubPropertySource

          public PropertySource.StubPropertySource(String name)

  - ### Method Detail

    - #### getProperty

          public String getProperty(String name)

      Always return `null`.
      Specified by:
        `getProperty` in class `PropertySource<Object>`
      Parameters:
        `name` - the property to find
      See Also:
        `PropertyResolver.getRequiredProperty(String)`