public class BeanNotOfRequiredTypeException extends BeansException
Constructor and Description |
---|
BeanNotOfRequiredTypeException(java.lang.String beanName,
java.lang.Class<?> requiredType,
java.lang.Class<?> actualType)
Create a new BeanNotOfRequiredTypeException.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getActualType()
Return the actual type of the instance found.
|
java.lang.String |
getBeanName()
Return the name of the instance that was of the wrong type.
|
java.lang.Class<?> |
getRequiredType()
Return the expected type for the bean.
|
equals, hashCode
contains, getMessage, getMostSpecificCause, getRootCause
public BeanNotOfRequiredTypeException(java.lang.String beanName, java.lang.Class<?> requiredType, java.lang.Class<?> actualType)
beanName
- the name of the bean requestedrequiredType
- the required typeactualType
- the actual type returned, which did not match
the expected typepublic java.lang.String getBeanName()
public java.lang.Class<?> getRequiredType()
public java.lang.Class<?> getActualType()