FactoryBean interface. Implementations may
indicate whether they always return independent instances, for the
case where their isSingleton() implementation returning
false does not clearly indicate independent instances.
Plain FactoryBean implementations which do not implement
this extended interface are simply assumed to always return independent
instances if their isSingleton() implementation returns
false; the exposed object is only accessed on demand.
Note
This interface is a special purpose interface, mainly for
internal use within the framework and within collaborating frameworks.
In general, application-provided FactoryBeans should simply implement
the plain FactoryBean interface. New methods might be added
to this extended interface even in point releases.
isPrototype(), isSingleton()
| Modifier and Type | Method and Description |
|---|---|
| public default boolean | Returns: whether eager initialization appliesDoes this FactoryBean expect eager initialization, that is, eagerly initialize itself as well as expect eager initialization of its singleton object (if any)? |
| public default boolean | Returns: whether the exposed object is a prototypeIs the object managed by this factory a prototype? |
| isEagerInit | back to summary |
|---|---|
| public default boolean isEagerInit() Does this FactoryBean expect eager initialization, that is, eagerly initialize itself as well as expect eager initialization of its singleton object (if any)? A standard FactoryBean is not expected to initialize eagerly:
Its The default implementation returns
| |
| isPrototype | back to summary |
|---|---|
| public default boolean isPrototype() Is the object managed by this factory a prototype? That is,
will The prototype status of the FactoryBean itself will generally
be provided by the owning This method is supposed to strictly check for independent instances;
it should not return The default implementation returns
| |