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
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- BeanIsNotAFactoryException
- public class BeanNotOfRequiredTypeException
- extends BeansException
Thrown when a bean doesn't match the required type.
- Author:
- Rod Johnson
- See Also:
- Serialized Form
Constructor Summary |
BeanNotOfRequiredTypeException(java.lang.String name,
java.lang.Class requiredType,
java.lang.Object actualInstance)
Creates new BeanNotOfRequiredTypeException . |
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 |
BeanNotOfRequiredTypeException
public BeanNotOfRequiredTypeException(java.lang.String name,
java.lang.Class requiredType,
java.lang.Object actualInstance)
- Creates new
BeanNotOfRequiredTypeException
.
- Parameters:
name
- name of the bean requestedrequiredType
- required typeactualInstance
- the instance actually returned, whose
class did not match the expected type.
getBeanName
public java.lang.String getBeanName()
getRequiredType
public java.lang.Class getRequiredType()
getActualType
public java.lang.Class getActualType()
getActualInstance
public java.lang.Object getActualInstance()
Copyright (C) 2003-2004 The Spring Framework Project.