Class ConversionExecutionException

All Implemented Interfaces:
Serializable

public class ConversionExecutionException extends ConversionException
Thrown when an attempt to execute a type conversion fails.
Author:
Keith Donald
See Also:
  • 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 convert
      sourceClass - the value's original type
      targetClass - the value's target type
      cause - 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 convert
      sourceClass - the value's original type
      targetClass - the value's target type
      message - a descriptive message of what went wrong.
  • Method Details

    • getValue

      public Object getValue()
      Returns the actual value we tried to convert, an instance of getSourceClass().
    • getSourceClass

      public Class<?> getSourceClass()
      Returns the source type we tried to convert the value from.
    • getTargetClass

      public Class<?> getTargetClass()
      Returns the target type we tried to convert the value to.