org.springframework.beans.factory
Class BeanNotOfRequiredTypeException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.springframework.core.NestedRuntimeException
                  extended byorg.springframework.beans.BeansException
                      extended byorg.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.
 
Method Summary
 java.lang.Object getActualInstance()
           
 java.lang.Class getActualType()
           
 java.lang.String getBeanName()
           
 java.lang.Class getRequiredType()
           
 
Methods inherited from class org.springframework.core.NestedRuntimeException
getCause, getMessage, 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

BeanNotOfRequiredTypeException

public BeanNotOfRequiredTypeException(java.lang.String name,
                                      java.lang.Class requiredType,
                                      java.lang.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.
Method Detail

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.