org.springframework.core.env

## 类 MapPropertySource

- java.lang.Object
- - org.springframework.core.env.PropertySource<T>
  - - org.springframework.core.env.EnumerablePropertySource<Map<String,Object>>
    - - org.springframework.core.env.MapPropertySource

- 直接已知子类:
    PropertiesPropertySource, SystemEnvironmentPropertySource

      public class MapPropertySource
      extends EnumerablePropertySource<Map<String,Object>>

  `PropertySource` that reads keys and values from a `Map` object.
  从以下版本开始:
    3.1
  作者:
    Chris Beams, Juergen Hoeller
  另请参阅:
    `PropertiesPropertySource`

- - ### 嵌套类概要

    - ### 从类继承的嵌套类/接口 org.springframework.core.env.PropertySource

      `PropertySource.StubPropertySource`

  - ### 字段概要

    - ### 从类继承的字段 org.springframework.core.env.PropertySource

      `logger, name, source`

  - ### 构造器概要

    构造器
    构造器和说明
    `MapPropertySource(String name, Map<String,Object> source)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `containsProperty(String name)` Return whether this `PropertySource` contains a property with the given name.
    `Object` | `getProperty(String name)` Return the value associated with the given name, or `null` if not found.
    `String[]` | `getPropertyNames()` Return the names of all properties contained by the source object (never `null`).

    - ### 从类继承的方法 org.springframework.core.env.PropertySource

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

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### MapPropertySource

          public MapPropertySource(String name,
                                   Map<String,Object> source)

  - ### 方法详细资料

    - #### getProperty

          @Nullable
          public Object getProperty(String name)

      从类复制的说明: `PropertySource`
      Return the value associated with the given name, or `null` if not found.
      指定者:
        `getProperty` 在类中 `PropertySource<Map<String,Object>>`
      参数:
        `name` - the property to find
      另请参阅:
        `PropertyResolver.getRequiredProperty(String)`

    - #### containsProperty

          public boolean containsProperty(String name)

      从类复制的说明: `EnumerablePropertySource`
      Return whether this `PropertySource` contains a property with the given name.

      This implementation checks for the presence of the given name within the `EnumerablePropertySource.getPropertyNames()` array.

      覆盖:
        `containsProperty` 在类中 `EnumerablePropertySource<Map<String,Object>>`
      参数:
        `name` - the name of the property to find

    - #### getPropertyNames

          public String[] getPropertyNames()

      从类复制的说明: `EnumerablePropertySource`
      Return the names of all properties contained by the source object (never `null`).
      指定者:
        `getPropertyNames` 在类中 `EnumerablePropertySource<Map<String,Object>>`