From 80d46ba80e8c813a32180196b87d2f81d50f0d14 Mon Sep 17 00:00:00 2001 From: Sviatoslav Hryb Date: Wed, 21 Apr 2021 15:06:43 +0300 Subject: [PATCH] Update FactoryBean generic description in ref docs Closes gh-26758 --- src/docs/asciidoc/core/core-beans.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/docs/asciidoc/core/core-beans.adoc b/src/docs/asciidoc/core/core-beans.adoc index 145d7a1222..3885a714f6 100644 --- a/src/docs/asciidoc/core/core-beans.adoc +++ b/src/docs/asciidoc/core/core-beans.adoc @@ -4539,14 +4539,14 @@ Java as opposed to a (potentially) verbose amount of XML, you can create your ow `FactoryBean`, write the complex initialization inside that class, and then plug your custom `FactoryBean` into the container. -The `FactoryBean` interface provides three methods: +The `FactoryBean` interface provides three methods: -* `Object getObject()`: Returns an instance of the object this factory creates. The +* `T getObject()`: Returns an instance of the object this factory creates. The instance can possibly be shared, depending on whether this factory returns singletons or prototypes. * `boolean isSingleton()`: Returns `true` if this `FactoryBean` returns singletons or `false` otherwise. -* `Class getObjectType()`: Returns the object type returned by the `getObject()` method +* `Class getObjectType()`: Returns the object type returned by the `getObject()` method or `null` if the type is not known in advance. The `FactoryBean` concept and interface is used in a number of places within the Spring