org.springframework.core.convert

## 类 ConversionFailedException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.springframework.core.NestedRuntimeException
        - - org.springframework.core.convert.ConversionException
          - - org.springframework.core.convert.ConversionFailedException

- 所有已实现的接口:
    Serializable

      public class ConversionFailedException
      extends ConversionException

  Exception to be thrown when an actual type conversion attempt fails.
  从以下版本开始:
    3.0
  作者:
    Keith Donald, Juergen Hoeller
  另请参阅:
    序列化表格

- - ### 构造器概要

    构造器
    构造器和说明
    `ConversionFailedException(TypeDescriptor sourceType, TypeDescriptor targetType, Object value, Throwable cause)` Create a new conversion exception.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `TypeDescriptor` | `getSourceType()` Return the source type we tried to convert the value from.
    `TypeDescriptor` | `getTargetType()` Return the target type we tried to convert the value to.
    `Object` | `getValue()` Return the offending value.

    - ### 从类继承的方法 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`

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

    - #### ConversionFailedException

          public ConversionFailedException(@Nullable
                                           TypeDescriptor sourceType,
                                           TypeDescriptor targetType,
                                           @Nullable
                                           Object value,
                                           Throwable cause)

      Create a new conversion exception.
      参数:
        `sourceType` - the value's original type
        `targetType` - the value's target type
        `value` - the value we tried to convert
        `cause` - the cause of the conversion failure

  - ### 方法详细资料

    - #### getSourceType

          @Nullable
          public TypeDescriptor getSourceType()

      Return the source type we tried to convert the value from.

    - #### getTargetType

          public TypeDescriptor getTargetType()

      Return the target type we tried to convert the value to.

    - #### getValue

          @Nullable
          public Object getValue()

      Return the offending value.