spring-framework / org.springframework.beans / TypeMismatchException

TypeMismatchException

open class TypeMismatchException : PropertyAccessException

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

Author
Rod Johnson

Author
Juergen Hoeller

Constructors

<init>

TypeMismatchException(propertyChangeEvent: PropertyChangeEvent, requiredType: Class<*>)
TypeMismatchException(propertyChangeEvent: PropertyChangeEvent, requiredType: Class<*>, cause: Throwable)

Create a new TypeMismatchException.

TypeMismatchException(value: Any, requiredType: Class<*>)
TypeMismatchException(value: Any, requiredType: Class<*>, cause: Throwable)

Create a new TypeMismatchException without PropertyChangeEvent.

Properties

ERROR_CODE

static val ERROR_CODE: String

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

Functions

getErrorCode

open fun getErrorCode(): String

getRequiredType

open fun getRequiredType(): Class<*>

Return the required target type, if any.

getValue

open fun getValue(): Any

Return the offending value (may be null).

Inherited Functions

getPropertyChangeEvent

open fun getPropertyChangeEvent(): PropertyChangeEvent

Return the PropertyChangeEvent that resulted in the problem.

May be null; only available if an actual bean property was affected.

getPropertyName

open fun getPropertyName(): String

Return the name of the affected property, if available.

Inheritors

ConversionNotSupportedException

open class ConversionNotSupportedException : TypeMismatchException

Exception thrown when no suitable editor or converter can be found for a bean property.

MethodArgumentTypeMismatchException

open class MethodArgumentTypeMismatchException : TypeMismatchException

A TypeMismatchException raised while resolving a controller method argument. Provides access to the target org.springframework.core.MethodParameter.