public class SingletonScopedFactoryBean<T> extends GenericScopedFactoryBean<T>
ScopedFactoryBean for beans of the SingletonScopedFactoryBeanHandler.SINGLETON_SCOPE-scope.| Modifier and Type | Method and Description |
|---|---|
static <T> SingletonScopedFactoryBean<T> |
lazy(java.lang.Class<T> type,
java8.util.function.Supplier<T> producer)
Creates a new
SingletonScopedFactoryBean to produce a bean of the given type using the given producer. |
getBeanType, getScope, produceBeanpublic static <T> SingletonScopedFactoryBean<T> lazy(java.lang.Class<T> type, java8.util.function.Supplier<T> producer)
SingletonScopedFactoryBean to produce a bean of the given type using the given producer.
Since beans are singletons by default, this has the effect of a lazy instantiation.
T - the type of bean producedtype - the type of bean producedproducer - the producer to create new beansSingletonScopedFactoryBean