public class BeanNotOfRequiredTypeException extends BeansException
| 构造器和说明 |
|---|
BeanNotOfRequiredTypeException(String beanName,
Class<?> requiredType,
Class<?> actualType)
Create a new BeanNotOfRequiredTypeException.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Class<?> |
getActualType()
Return the actual type of the instance found.
|
String |
getBeanName()
Return the name of the instance that was of the wrong type.
|
Class<?> |
getRequiredType()
Return the expected type for the bean.
|
contains, getMessage, getMostSpecificCause, getRootCausepublic BeanNotOfRequiredTypeException(String beanName, Class<?> requiredType, Class<?> actualType)
beanName - the name of the bean requestedrequiredType - the required typeactualType - the actual type returned, which did not match
the expected type