Class ValueCoercionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.binding.expression.EvaluationException
org.springframework.binding.expression.ValueCoercionException
- All Implemented Interfaces:
Serializable
An evaluation exception indicating an expression failed to evaluate because the source value could not be coerced to
the target class
- Author:
- Scott Andrews
- See Also:
-
Constructor Summary
ConstructorDescriptionValueCoercionException
(Class<?> contextClass, String property, Object value, Class<?> targetClass) Creates a new property not found exceptionValueCoercionException
(Class<?> contextClass, String property, Object value, Class<?> targetClass, Throwable cause) Creates a new property not found exception -
Method Summary
Methods inherited from class org.springframework.binding.expression.EvaluationException
getContextClass, getExpressionString
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValueCoercionException
public ValueCoercionException(Class<?> contextClass, String property, Object value, Class<?> targetClass) Creates a new property not found exception- Parameters:
contextClass
- the class of object upon which coercion was attemptedproperty
- the property that could not be coercedvalue
- the value that could not be coercedtargetClass
- the class the value could not be coerced to
-
ValueCoercionException
public ValueCoercionException(Class<?> contextClass, String property, Object value, Class<?> targetClass, Throwable cause) Creates a new property not found exception- Parameters:
contextClass
- the class of object upon which coercion was attemptedproperty
- the property that could not be coercedvalue
- the value that could not be coercedtargetClass
- the class the value could not be coerced tocause
- root cause of the failure
-
-
Method Details
-
getValue
- Returns:
- the value that could not be coerced; this value is a transient field
-
getTargetClass
- Returns:
- the class the value could not be coerced to
-