类 ScopedProxyUtils


  • public abstract class ScopedProxyUtils
    extends Object
    Utility class for creating a scoped proxy. Used by ScopedProxyBeanDefinitionDecorator and ClassPathBeanDefinitionScanner.
    从以下版本开始:
    2.5
    作者:
    Mark Fisher, Juergen Hoeller, Rob Harrop
    • 方法详细资料

      • createScopedProxy

        public static BeanDefinitionHolder createScopedProxy​(BeanDefinitionHolder definition,
                                                             BeanDefinitionRegistry registry,
                                                             boolean proxyTargetClass)
        Generate a scoped proxy for the supplied target bean, registering the target bean with an internal name and setting 'targetBeanName' on the scoped proxy.
        参数:
        definition - the original bean definition
        registry - the bean definition registry
        proxyTargetClass - whether to create a target class proxy
        返回:
        the scoped proxy definition
      • getTargetBeanName

        public static String getTargetBeanName​(String originalBeanName)
        Generate the bean name that is used within the scoped proxy to reference the target bean.
        参数:
        originalBeanName - the original name of bean
        返回:
        the generated bean to be used to reference the target bean
      • isScopedTarget

        public static boolean isScopedTarget​(String beanName)
        Specify if the beanName is the name of a bean that references the target bean within a scoped proxy.
        从以下版本开始:
        4.1.4