|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException org.springframework.core.NestedRuntimeException org.springframework.beans.BeansException org.springframework.beans.factory.BeanNotOfRequiredTypeException
public class BeanNotOfRequiredTypeException
Thrown when a bean doesn't match the expected type.
Field Summary | |
---|---|
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 Summary | |
---|---|
BeanNotOfRequiredTypeException(java.lang.String beanName,
java.lang.Class requiredType,
java.lang.Class actualType)
Create a new BeanNotOfRequiredTypeException. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.springframework.beans.BeansException |
---|
equals, hashCode |
Methods inherited from class org.springframework.core.NestedRuntimeException |
---|
contains, getMessage, getMostSpecificCause, getRootCause |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String beanName
private java.lang.Class requiredType
private java.lang.Class actualType
Constructor Detail |
---|
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 typeMethod Detail |
---|
public java.lang.String getBeanName()
public java.lang.Class getRequiredType()
public java.lang.Class getActualType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |