Class 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:
  • 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 attempted
      property - the property that could not be coerced
      value - the value that could not be coerced
      targetClass - 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 attempted
      property - the property that could not be coerced
      value - the value that could not be coerced
      targetClass - the class the value could not be coerced to
      cause - root cause of the failure
  • Method Details

    • 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