org.springframework.binding.expression
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
public class ValueCoercionException
- extends EvaluationException
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:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
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
getValue
public Object getValue()
- Returns:
- the value that could not be coerced; this value is a transient field
getTargetClass
public Class getTargetClass()
- Returns:
- the class the value could not be coerced to