未验证 提交 80d46ba8 编写于 作者: S Sviatoslav Hryb 提交者: GitHub

Update FactoryBean generic description in ref docs

Closes gh-26758
上级 db9a10bf
...@@ -4539,14 +4539,14 @@ Java as opposed to a (potentially) verbose amount of XML, you can create your ow ...@@ -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 `FactoryBean`, write the complex initialization inside that class, and then plug your
custom `FactoryBean` into the container. custom `FactoryBean` into the container.
The `FactoryBean` interface provides three methods: The `FactoryBean<T>` 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 instance can possibly be shared, depending on whether this factory returns singletons
or prototypes. or prototypes.
* `boolean isSingleton()`: Returns `true` if this `FactoryBean` returns singletons or * `boolean isSingleton()`: Returns `true` if this `FactoryBean` returns singletons or
`false` otherwise. `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. 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 The `FactoryBean` concept and interface is used in a number of places within the Spring
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册