Home » Spring-Framework-090522 » org.springframework » beans » factory » [javadoc | source]
org.springframework.beans.factory
public class: BeanNotOfRequiredTypeException [javadoc | source]
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:
    Serializable

Direct Known Subclasses:
    BeanIsNotAFactoryException

Thrown when a bean doesn't match the expected type.
Fields inherited from java.lang.RuntimeException:
serialVersionUID
Fields inherited from java.lang.Exception:
serialVersionUID
Constructor:
 public BeanNotOfRequiredTypeException(String beanName,
    Class requiredType,
    Class actualType) 
    Create a new BeanNotOfRequiredTypeException.
    Parameters:
    beanName - the name of the bean requested
    requiredType - the required type
    actualType - the actual type returned, which did not match the expected type
Method from org.springframework.beans.factory.BeanNotOfRequiredTypeException Summary:
getActualType,   getBeanName,   getRequiredType
Methods from org.springframework.beans.BeansException:
equals,   hashCode
Methods from org.springframework.core.NestedRuntimeException:
contains,   getMessage,   getMostSpecificCause,   getRootCause
Methods from java.lang.Throwable:
fillInStackTrace,   getCause,   getLocalizedMessage,   getMessage,   getStackTrace,   initCause,   printStackTrace,   printStackTrace,   printStackTrace,   setStackTrace,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.BeanNotOfRequiredTypeException Detail:
 public Class getActualType() 
    Return the actual type of the instance found.
 public String getBeanName() 
    Return the name of the instance that was of the wrong type.
 public Class getRequiredType() 
    Return the expected type for the bean.