org.springframework.beans.factory.FactoryBean instances,
integrated with DefaultSingletonBeanRegistry's singleton management.
Serves as base class for AbstractBeanFactory.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | factoryBeanObjectCache
Cache of singleton objects created by FactoryBeans: FactoryBean name to object. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | clearSingletonCache()
Overrides org. |
| private Object | Returns: the object obtained from the FactoryBeanthe FactoryBean instance factory, String the name of the bean beanName)Obtain an object to expose from the given FactoryBean. |
| protected Object | Returns: the object obtained from the FactoryBean, ornull if not availablethe name of the bean beanName)Obtain an object to expose from the given FactoryBean, if available in cached form. |
| protected FactoryBean | Returns: the bean instance as FactoryBeanthe name of the bean beanName, Object the corresponding bean instance beanInstance)Get a FactoryBean for the given bean if possible. |
| pack-priv ResolvableType | Returns: the nested object type, orNONE if not resolvablethe FactoryBean type type)Determine the FactoryBean object type from the given generic declaration. |
| protected Object | Returns: the object obtained from the FactoryBeanthe FactoryBean instance factory, String the name of the bean beanName, boolean whether the bean is subject to post-processing shouldPostProcess)Obtain an object to expose from the given FactoryBean. |
| protected Class | Returns: the FactoryBean's object type, ornull if the type cannot be determined yetthe FactoryBean instance to check factoryBean)Determine the type for the given FactoryBean. |
| pack-priv ResolvableType | getTypeForFactoryBeanFromAttributes(AttributeAccessor
the attributes to inspect attributes)Determine the bean type for a FactoryBean by inspecting its attributes for a
|
| protected Object | Returns: the object to exposethe object obtained from the FactoryBean. object, String the name of the bean beanName)Post-process the given object that has been obtained from the FactoryBean. |
| protected void | removeSingleton(String
the name of the bean beanName)Overrides org. |
| factoryBeanObjectCache | back to summary |
|---|---|
| private final Map<String, Object> factoryBeanObjectCache Cache of singleton objects created by FactoryBeans: FactoryBean name to object. | |
| FactoryBeanRegistrySupport | back to summary |
|---|---|
| public FactoryBeanRegistrySupport() | |
| clearSingletonCache | back to summary |
|---|---|
| protected void clearSingletonCache() Overrides org. Overridden to clear the FactoryBean object cache as well.
| |
| doGetObjectFromFactoryBean | back to summary |
|---|---|
| private Object doGetObjectFromFactoryBean(FactoryBean<?> factory, String beanName) throws BeanCreationException Obtain an object to expose from the given FactoryBean.
| |
| getCachedObjectForFactoryBean | back to summary |
|---|---|
| protected Object getCachedObjectForFactoryBean(String beanName) Obtain an object to expose from the given FactoryBean, if available in cached form. Quick check for minimal synchronization. | |
| getFactoryBean | back to summary |
|---|---|
| protected FactoryBean Get a FactoryBean for the given bean if possible.
| |
| getFactoryBeanGeneric | back to summary |
|---|---|
| pack-priv ResolvableType getFactoryBeanGeneric(ResolvableType type) Determine the FactoryBean object type from the given generic declaration.
| |
| getObjectFromFactoryBean | back to summary |
|---|---|
| protected Object getObjectFromFactoryBean(FactoryBean<?> factory, String beanName, boolean shouldPostProcess) Obtain an object to expose from the given FactoryBean.
| |
| getTypeForFactoryBean | back to summary |
|---|---|
| protected Class Determine the type for the given FactoryBean.
| |
| getTypeForFactoryBeanFromAttributes | back to summary |
|---|---|
| pack-priv ResolvableType getTypeForFactoryBeanFromAttributes(AttributeAccessor attributes) Determine the bean type for a FactoryBean by inspecting its attributes for a
| |
| postProcessObjectFromFactoryBean | back to summary |
|---|---|
| protected Object postProcessObjectFromFactoryBean(Object object, String beanName) throws BeansException Post-process the given object that has been obtained from the FactoryBean. The resulting object will get exposed for bean references. The default implementation simply returns the given object as-is. Subclasses may override this, for example, to apply post-processors.
| |
| removeSingleton | back to summary |
|---|---|
| protected void removeSingleton(String beanName) Overrides org. Overridden to clear the FactoryBean object cache as well.
| |