org.springframework.context.expression

## 类 EnvironmentAccessor

- java.lang.Object
- - org.springframework.context.expression.EnvironmentAccessor

- 所有已实现的接口:
    org.springframework.expression.PropertyAccessor

      public class EnvironmentAccessor
      extends Object
      implements org.springframework.expression.PropertyAccessor

  Read-only EL property accessor that knows how to retrieve keys of a Spring `Environment` instance.
  从以下版本开始:
    3.1
  作者:
    Chris Beams

- - ### 构造器概要

    构造器
    构造器和说明
    `EnvironmentAccessor()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `canRead(org.springframework.expression.EvaluationContext context, Object target, String name)` Can read any `Environment`, thus always returns true.
    `boolean` | `canWrite(org.springframework.expression.EvaluationContext context, Object target, String name)` Read-only: returns `false`.
    `Class<?>[]` | `getSpecificTargetClasses()`
    `org.springframework.expression.TypedValue` | `read(org.springframework.expression.EvaluationContext context, Object target, String name)` Access the given target object by resolving the given property name against the given target environment.
    `void` | `write(org.springframework.expression.EvaluationContext context, Object target, String name, Object newValue)` Read-only: no-op.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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

    - #### EnvironmentAccessor

          public EnvironmentAccessor()

  - ### 方法详细资料

    - #### getSpecificTargetClasses

          public Class<?>[] getSpecificTargetClasses()

      指定者:
        `getSpecificTargetClasses` 在接口中 `org.springframework.expression.PropertyAccessor`

    - #### canRead

          public boolean canRead(org.springframework.expression.EvaluationContext context,
                                 @Nullable
                                 Object target,
                                 String name)
                          throws org.springframework.expression.AccessException

      Can read any `Environment`, thus always returns true.
      指定者:
        `canRead` 在接口中 `org.springframework.expression.PropertyAccessor`
      返回:
        true
      抛出:
        `org.springframework.expression.AccessException`

    - #### read

          public org.springframework.expression.TypedValue read(org.springframework.expression.EvaluationContext context,
                                                                @Nullable
                                                                Object target,
                                                                String name)
                                                         throws org.springframework.expression.AccessException

      Access the given target object by resolving the given property name against the given target environment.
      指定者:
        `read` 在接口中 `org.springframework.expression.PropertyAccessor`
      抛出:
        `org.springframework.expression.AccessException`

    - #### canWrite

          public boolean canWrite(org.springframework.expression.EvaluationContext context,
                                  @Nullable
                                  Object target,
                                  String name)
                           throws org.springframework.expression.AccessException

      Read-only: returns `false`.
      指定者:
        `canWrite` 在接口中 `org.springframework.expression.PropertyAccessor`
      抛出:
        `org.springframework.expression.AccessException`

    - #### write

          public void write(org.springframework.expression.EvaluationContext context,
                            @Nullable
                            Object target,
                            String name,
                            @Nullable
                            Object newValue)
                     throws org.springframework.expression.AccessException

      Read-only: no-op.
      指定者:
        `write` 在接口中 `org.springframework.expression.PropertyAccessor`
      抛出:
        `org.springframework.expression.AccessException`