public final class

ConversionFailedException

extends ConversionException
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

Class Overview

Exception to be thrown when an actual type conversion attempt fails.

Summary

Public Constructors
ConversionFailedException(TypeDescriptor sourceType, TypeDescriptor targetType, Object value, Throwable cause)
Create a new conversion exception.
Public Methods
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.
[Expand]
Inherited Methods
From class org.springframework.core.NestedRuntimeException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

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

Also: SpringCore

Create a new conversion exception.

Parameters
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

Public Methods

public TypeDescriptor getSourceType ()

Also: SpringCore

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

public TypeDescriptor getTargetType ()

Also: SpringCore

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

public Object getValue ()

Also: SpringCore

Return the offending value.