org.springframework.aop.scope
Class ScopedProxyUtils
java.lang.Object
org.springframework.aop.scope.ScopedProxyUtils
public abstract class ScopedProxyUtils
- extends java.lang.Object
Utility class for creating a scoped proxy.
Used by ScopedProxyBeanDefinitionDecorator and ClassPathBeanDefinitionScanner.
- Since:
- 2.5
- Author:
- Mark Fisher, Juergen Hoeller, Rob Harrop
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TARGET_NAME_PREFIX
private static final java.lang.String TARGET_NAME_PREFIX
- See Also:
- Constant Field Values
ScopedProxyUtils
public ScopedProxyUtils()
createScopedProxy
public static BeanDefinitionHolder createScopedProxy(BeanDefinitionHolder definition,
BeanDefinitionRegistry registry,
boolean proxyTargetClass)
- Generates a scoped proxy for the supplied target bean, registering the target
bean with an internal name and setting 'targetBeanName' on the scoped proxy.
- Parameters:
definition
- the original bean definitionregistry
- the bean definition registryproxyTargetClass
- whether to create a target class proxy
- Returns:
- the scoped proxy definition
getTargetBeanName
public static java.lang.String getTargetBeanName(java.lang.String originalBeanName)
- Generates the bean name that is used within the scoped proxy to reference the target bean.
- Parameters:
originalBeanName
- the original name of bean
- Returns:
- the generated bean to be used to reference the target bean