org.springframework.beans.factory

## Class BeanIsNotAFactoryException

- 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
            - - org.springframework.beans.factory.BeanIsNotAFactoryException

All Implemented Interfaces:
  Serializable

    public class BeanIsNotAFactoryException
    extends BeanNotOfRequiredTypeException

Exception thrown when a bean is not a factory, but a user tries to get at the factory for the given bean name. Whether a bean is a factory is determined by whether it implements the FactoryBean interface.

Since:
  10.03.2003
Author:
  Rod Johnson
See Also:
  `FactoryBean`, Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`BeanIsNotAFactoryException(String name, Class actualType)` Create a new BeanIsNotAFactoryException.

### Method Summary

### Methods inherited from class org.springframework.beans.factory.BeanNotOfRequiredTypeException

`getActualType, getBeanName, getRequiredType`

### Methods inherited from class org.springframework.beans.BeansException

`equals, hashCode`

### Methods inherited from class org.springframework.core.NestedRuntimeException

`contains, getMessage, getMostSpecificCause, getRootCause`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### BeanIsNotAFactoryException

    public BeanIsNotAFactoryException(String name,
                              Class actualType)

Create a new BeanIsNotAFactoryException.

Parameters:
  `name` - the name of the bean requested
  `actualType` - the actual type returned, which did not match the expected type