Class TypeConversionException

All Implemented Interfaces:
Serializable

public final class TypeConversionException extends RuntimeException
Indicates that a value could not be converted to the desired type.
Author:
Ayco Holleman
See Also:
  • Constructor Details

    • TypeConversionException

      public TypeConversionException(Object inputValue, Class<?> targetType, String msg, Object... msgArgs)
      Creates a new TypeConversionException for the specified input value and target type.
      Parameters:
      inputValue - the input value (may be null, indicating that null could not be converted to the target type)
      targetType - the target type
      msg - a custom message or String.format message pattern
      msgArgs - zero or more message arguments
  • Method Details

    • getInputValue

      public Object getInputValue()
      Returns the value for which the type conversion failed.
      Returns:
      the value for which the type conversion failed
    • getTargetType

      public Class<?> getTargetType()
      Returns the target type of the type conversion.
      Returns:
      the target type of the type conversion