org.springframework.beans

## 类 PropertyAccessException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.springframework.core.NestedRuntimeException
        - - org.springframework.beans.BeansException
          - - org.springframework.beans.PropertyAccessException

- 所有已实现的接口:
    Serializable
  直接已知子类:
    MethodInvocationException, TypeMismatchException

      public abstract class PropertyAccessException
      extends BeansException

  Superclass for exceptions related to a property access, such as type mismatch or invocation target exception.
  作者:
    Rod Johnson, Juergen Hoeller
  另请参阅:
    序列化表格

- - ### 构造器概要

    构造器
    构造器和说明
    `PropertyAccessException(PropertyChangeEvent propertyChangeEvent, String msg, Throwable cause)` Create a new PropertyAccessException.
    `PropertyAccessException(String msg, Throwable cause)` Create a new PropertyAccessException without PropertyChangeEvent.

  - ### 方法概要

    所有方法 实例方法 抽象方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `abstract String` | `getErrorCode()` Return a corresponding error code for this type of exception.
    `PropertyChangeEvent` | `getPropertyChangeEvent()` Return the PropertyChangeEvent that resulted in the problem.
    `String` | `getPropertyName()` Return the name of the affected property, if available.
    `Object` | `getValue()` Return the affected value that was about to be set, if any.

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

      `contains, getMessage, getMostSpecificCause, getRootCause`

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

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

    - #### PropertyAccessException

          public PropertyAccessException(PropertyChangeEvent propertyChangeEvent,
                                         String msg,
                                         @Nullable
                                         Throwable cause)

      Create a new PropertyAccessException.
      参数:
        `propertyChangeEvent` - the PropertyChangeEvent that resulted in the problem
        `msg` - the detail message
        `cause` - the root cause

    - #### PropertyAccessException

          public PropertyAccessException(String msg,
                                         @Nullable
                                         Throwable cause)

      Create a new PropertyAccessException without PropertyChangeEvent.
      参数:
        `msg` - the detail message
        `cause` - the root cause

  - ### 方法详细资料

    - #### getPropertyChangeEvent

          @Nullable
          public PropertyChangeEvent getPropertyChangeEvent()

      Return the PropertyChangeEvent that resulted in the problem.

      May be `null`; only available if an actual bean property was affected.

    - #### getPropertyName

          @Nullable
          public String getPropertyName()

      Return the name of the affected property, if available.

    - #### getValue

          @Nullable
          public Object getValue()

      Return the affected value that was about to be set, if any.

    - #### getErrorCode

          public abstract String getErrorCode()

      Return a corresponding error code for this type of exception.