com.interface21.beans.factory
Class BeanNotOfRequiredTypeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.interface21.core.NestedRuntimeException
                          |
                          +--com.interface21.beans.BeansException
                                |
                                +--com.interface21.beans.factory.BeanNotOfRequiredTypeException
All Implemented Interfaces:
HasRootCause, java.io.Serializable
Direct Known Subclasses:
BeanIsNotAFactoryException

public class BeanNotOfRequiredTypeException
extends BeansException

Thrown when a bean doesn't match the required type

Version:
$RevisionId$
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 com.interface21.core.NestedRuntimeException
getMessage, getRootCause, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, 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()


Rod Johnson and Spring contributors 2001-2003.