org.springframework.beans.factory
Class BeanNotOfRequiredTypeException
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
- Direct Known Subclasses:
- BeanIsNotAFactoryException
- public class BeanNotOfRequiredTypeException
- extends BeansException
Thrown when a bean doesn't match the required type.
- Author:
- Rod Johnson
| Methods inherited from class java.lang.Throwable |
printStackTrace, getStackTrace, setStackTrace, getLocalizedMessage, toString, fillInStackTrace, initCause |
| Methods inherited from class java.lang.Object |
hashCode, notify, notifyAll, wait, wait, wait, getClass, equals |
BeanNotOfRequiredTypeException
public BeanNotOfRequiredTypeException(String name, Class requiredType, Object actualInstance)
- Creates new
BeanNotOfRequiredTypeException.- Parameters:
- name - name of the bean requested
- requiredType - required type
- actualInstance - the instance actually returned, whose
class did not match the expected type.
getActualInstance
public Object getActualInstance()
getActualType
public Class getActualType()
getBeanName
public String getBeanName()
getRequiredType
public Class getRequiredType()
to Class java.lang.String- The name of the instance that was of the wrong type
to Class java.lang.Class
- The required type