Class TypeMismatchException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConversionNotSupportedException

public class TypeMismatchException extends PropertyAccessException
Exception thrown on a type mismatch when trying to set a bean property.
Author:
Rod Johnson, Juergen Hoeller
See Also:
  • Field Details

    • ERROR_CODE

      public static final String ERROR_CODE
      Error code that a type mismatch error will be registered with.
      See Also:
  • Constructor Details

    • TypeMismatchException

      public TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class<?> requiredType)
      Create a new TypeMismatchException.
      Parameters:
      propertyChangeEvent - the PropertyChangeEvent that resulted in the problem
      requiredType - the required target type
    • TypeMismatchException

      public TypeMismatchException(PropertyChangeEvent propertyChangeEvent, @Nullable Class<?> requiredType, @Nullable Throwable cause)
      Create a new TypeMismatchException.
      Parameters:
      propertyChangeEvent - the PropertyChangeEvent that resulted in the problem
      requiredType - the required target type (or null if not known)
      cause - the root cause (may be null)
    • TypeMismatchException

      public TypeMismatchException(@Nullable Object value, @Nullable Class<?> requiredType)
      Create a new TypeMismatchException without a PropertyChangeEvent.
      Parameters:
      value - the offending value that couldn't be converted (may be null)
      requiredType - the required target type (or null if not known)
      See Also:
    • TypeMismatchException

      public TypeMismatchException(@Nullable Object value, @Nullable Class<?> requiredType, @Nullable Throwable cause)
      Create a new TypeMismatchException without a PropertyChangeEvent.
      Parameters:
      value - the offending value that couldn't be converted (may be null)
      requiredType - the required target type (or null if not known)
      cause - the root cause (may be null)
      See Also:
  • Method Details