public class BeanNotOfRequiredTypeException extends BeansException
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Class<?> |
actualType
The offending type
|
private java.lang.String |
beanName
The name of the instance that was of the wrong type
|
private java.lang.Class<?> |
requiredType
The required type
|
| 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, hashCodecontains, getMessage, getMostSpecificCause, getRootCauseprivate java.lang.String beanName
private java.lang.Class<?> requiredType
private java.lang.Class<?> actualType
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()