From a0f0b438ff3ac4c3bdb74413d5e10afbb59e8d04 Mon Sep 17 00:00:00 2001 From: Sviatoslav Hryb Date: Sun, 4 Apr 2021 12:58:00 +0300 Subject: [PATCH] fix FactoryBean generic description --- 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 1b58d774f03d..23f4e881d7d8 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