org.springframework.beans
Class TypeMismatchException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.springframework.core.NestedRuntimeException
                  extended byorg.springframework.beans.BeansException
                      extended byorg.springframework.beans.PropertyAccessException
                          extended byorg.springframework.beans.TypeMismatchException
All Implemented Interfaces:
ErrorCoded, java.io.Serializable

public class TypeMismatchException
extends PropertyAccessException

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

Version:
$Revision: 1.6 $
Author:
Rod Johnson, Juergen Hoeller
See Also:
Serialized Form

Constructor Summary
TypeMismatchException(java.beans.PropertyChangeEvent propertyChangeEvent, java.lang.Class requiredType)
          Create a new TypeMismatchException.
TypeMismatchException(java.beans.PropertyChangeEvent propertyChangeEvent, java.lang.Class requiredType, java.lang.Throwable ex)
          Create a new TypeMismatchException.
 
Method Summary
 java.lang.String getErrorCode()
          Return the error code associated with this failure.
 java.lang.Class getRequiredType()
          Return the required target type.
 
Methods inherited from class org.springframework.beans.PropertyAccessException
getPropertyChangeEvent
 
Methods inherited from class org.springframework.core.NestedRuntimeException
getCause, getMessage, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeMismatchException

public TypeMismatchException(java.beans.PropertyChangeEvent propertyChangeEvent,
                             java.lang.Class requiredType)
Create a new TypeMismatchException.

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

TypeMismatchException

public TypeMismatchException(java.beans.PropertyChangeEvent propertyChangeEvent,
                             java.lang.Class requiredType,
                             java.lang.Throwable ex)
Create a new TypeMismatchException.

Parameters:
propertyChangeEvent - the PropertyChangeEvent that resulted in the problem
requiredType - the required target type
ex - the root cause
Method Detail

getRequiredType

public java.lang.Class getRequiredType()
Return the required target type.


getErrorCode

public java.lang.String getErrorCode()
Description copied from interface: ErrorCoded
Return the error code associated with this failure. The GUI can render this any way it pleases, allowing for localization etc.

Returns:
a String error code associated with this failure, or null if not error-coded


Copyright (C) 2003-2004 The Spring Framework Project.