Class ConversionExecutionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.binding.convert.ConversionException
org.springframework.binding.convert.ConversionExecutionException
- All Implemented Interfaces:
Serializable
Thrown when an attempt to execute a type conversion fails.
- Author:
- Keith Donald
- See Also:
-
Constructor Summary
ConstructorDescriptionConversionExecutionException
(Object value, Class<?> sourceClass, Class<?> targetClass, String message) Creates a new conversion exception.ConversionExecutionException
(Object value, Class<?> sourceClass, Class<?> targetClass, Throwable cause) Creates a new conversion exception. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
Returns the source type we tried to convert the value from.Class<?>
Returns the target type we tried to convert the value to.getValue()
Returns the actual value we tried to convert, an instance ofgetSourceClass()
.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ConversionExecutionException
public ConversionExecutionException(Object value, Class<?> sourceClass, Class<?> targetClass, Throwable cause) Creates a new conversion exception.- Parameters:
value
- the value we tried to convertsourceClass
- the value's original typetargetClass
- the value's target typecause
- the cause of the conversion failure
-
ConversionExecutionException
public ConversionExecutionException(Object value, Class<?> sourceClass, Class<?> targetClass, String message) Creates a new conversion exception.- Parameters:
value
- the value we tried to convertsourceClass
- the value's original typetargetClass
- the value's target typemessage
- a descriptive message of what went wrong.
-
-
Method Details
-
getValue
Returns the actual value we tried to convert, an instance ofgetSourceClass()
. -
getSourceClass
Returns the source type we tried to convert the value from. -
getTargetClass
Returns the target type we tried to convert the value to.
-