当前页面:
在线文档首页 >
Spring Framework 1.2.9 API 文档英文版
TypeMismatchException (Spring Framework) - Spring Framework 1.2.9 API 文档英文版
org.springframework.beans
Class TypeMismatchException
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
- All Implemented Interfaces:
- Serializable, ErrorCoded
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:
- Serialized Form
Field Summary |
static String |
ERROR_CODE
Error code that a type mismatch error will be registered with. |
ERROR_CODE
public static final String ERROR_CODE
- Error code that a type mismatch error will be registered with.
- See Also:
- Constant Field Values
TypeMismatchException
public TypeMismatchException(PropertyChangeEvent propertyChangeEvent,
Class requiredType)
- Create a new TypeMismatchException.
- Parameters:
propertyChangeEvent
- the PropertyChangeEvent that resulted in the problemrequiredType
- the required target type
TypeMismatchException
public TypeMismatchException(PropertyChangeEvent propertyChangeEvent,
Class requiredType,
Throwable ex)
- Create a new TypeMismatchException.
- Parameters:
propertyChangeEvent
- the PropertyChangeEvent that resulted in the problemrequiredType
- the required target type (or null
if not known)ex
- the root cause (may be null
)
getRequiredType
public Class getRequiredType()
- Return the required target type, if any.
getErrorCode
public 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) 2002-2007 The Spring Framework Project.