org.springframework.batch.core.scope.util
Class PlaceholderProxyFactoryBean
java.lang.Object
org.springframework.aop.framework.ProxyConfig
org.springframework.batch.core.scope.util.PlaceholderProxyFactoryBean
- All Implemented Interfaces:
- Serializable, BeanFactoryAware, FactoryBean
public class PlaceholderProxyFactoryBean
- extends ProxyConfig
- implements FactoryBean, BeanFactoryAware
Factory bean for proxies that can replace placeholders in their target. Just
a specialisation of ScopedProxyFactoryBean
, with a different target
source type.
- Author:
- Dave Syer
- See Also:
- Serialized Form
Methods inherited from class org.springframework.aop.framework.ProxyConfig |
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString |
PlaceholderProxyFactoryBean
public PlaceholderProxyFactoryBean(ContextFactory contextFactory)
- Create a new FactoryBean instance.
setTargetBeanName
public void setTargetBeanName(String targetBeanName)
- Set the name of the bean that is to be scoped.
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
- Specified by:
setBeanFactory
in interface BeanFactoryAware
getObject
public Object getObject()
- Specified by:
getObject
in interface FactoryBean
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interface FactoryBean
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interface FactoryBean
createScopedProxy
public static BeanDefinitionHolder createScopedProxy(BeanDefinitionHolder definition,
BeanDefinitionRegistry registry,
boolean proxyTargetClass)
- Convenience method to create a
BeanDefinition
for a target
wrapped in a placeholder tarrget source, able to defer binding of
placeholders until the bean is used.
- Parameters:
definition
- a target bean definitionregistry
- a BeanDefinitionRegistry
proxyTargetClass
- true if we need to use CGlib to create the
proxies
- Returns:
- a
BeanDefinitionHolder
for a
PlaceholderProxyFactoryBean
Copyright © 2009 SpringSource. All Rights Reserved.