BeanIsNotAFactoryException class

The error thrown when &name asks for the factory of a bean that is not a FactoryBean.

& before a bean name means "the factory itself, not its product", so it only works for factory beans. It is a BeanNotOfRequiredTypeException whose required type is FactoryBean.

factory.getBeanByName('&english'); // throws: English is no FactoryBean

Spring (Java):

factory.getBean("&english"); // BeanIsNotAFactoryException
Inheritance

Constructors

BeanIsNotAFactoryException(String beanName, Type actualType)
beanName, dereferenced with &, is an actualType, not a FactoryBean.

Properties

actualType → Type
The runtime type of the object found.
finalinherited
beanName → String
The bean (or resolvable dependency) that was looked up.
finalinherited
cause → Object?
The error that caused this one, if any: what a constructor threw, or the container error of a nested bean.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
message → String
A human-readable description of the problem.
finalinherited
mostSpecificCause → Object
rootCause, or this exception when it has no cause. Spring: getMostSpecificCause().
no setterinherited
requiredType → Type
The type that was requested.
finalinherited
rootCause → Object?
The innermost cause: cause followed through nested container errors, or null without a cause. Usually the error that really went wrong. Spring: getRootCause().
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited