public class

TypeMismatchException

extends PropertyAccessException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ org.springframework.core.NestedRuntimeException
           ↳ org.springframework.beans.BeansException
             ↳ org.springframework.beans.PropertyAccessException
               ↳ org.springframework.beans.TypeMismatchException
Known Direct Subclasses

Class Overview

Exception thrown on a type mismatch when trying to set a bean property.

Summary

Constants
String ERROR_CODE Error code that a type mismatch error will be registered with.
Public Constructors
TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class requiredType)
Create a new TypeMismatchException.
TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class requiredType, Throwable cause)
Create a new TypeMismatchException.
TypeMismatchException(Object value, Class requiredType)
Create a new TypeMismatchException without PropertyChangeEvent.
TypeMismatchException(Object value, Class requiredType, Throwable cause)
Create a new TypeMismatchException without PropertyChangeEvent.
Public Methods
String getErrorCode()
Class getRequiredType()
Return the required target type, if any.
Object getValue()
Return the offending value (may be null)
[Expand]
Inherited Methods
From class org.springframework.beans.PropertyAccessException
From class org.springframework.beans.BeansException
From class org.springframework.core.NestedRuntimeException
From class java.lang.Throwable
From class java.lang.Object
From interface org.springframework.core.ErrorCoded

Constants

public static final String ERROR_CODE

Also: SpringBeans

Error code that a type mismatch error will be registered with.

Constant Value: "typeMismatch"

Public Constructors

public TypeMismatchException (PropertyChangeEvent propertyChangeEvent, Class requiredType)

Also: SpringBeans

Create a new TypeMismatchException.

Parameters
propertyChangeEvent the PropertyChangeEvent that resulted in the problem
requiredType the required target type

public TypeMismatchException (PropertyChangeEvent propertyChangeEvent, Class requiredType, Throwable cause)

Also: SpringBeans

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)

public TypeMismatchException (Object value, Class requiredType)

Also: SpringBeans

Create a new TypeMismatchException without PropertyChangeEvent.

Parameters
value the offending value that couldn't be converted (may be null)
requiredType the required target type (or null if not known)

public TypeMismatchException (Object value, Class requiredType, Throwable cause)

Also: SpringBeans

Create a new TypeMismatchException without 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)

Public Methods

public String getErrorCode ()

Also: SpringBeans

public Class getRequiredType ()

Also: SpringBeans

Return the required target type, if any.

public Object getValue ()

Also: SpringBeans

Return the offending value (may be null)