|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.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.
Constructor Summary | |
---|---|
BeanNotOfRequiredTypeException(String beanName,
Class requiredType,
Class actualType)
Create a new BeanNotOfRequiredTypeException. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.springframework.core.NestedRuntimeException |
---|
contains, getCause, getMessage, getMostSpecificCause, getRootCause, printStackTrace, printStackTrace |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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 typeMethod Detail |
---|
public String getBeanName()
public Class getRequiredType()
public Class getActualType()
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |