Class ProxyReplacer


  • public class ProxyReplacer
    extends java.lang.Object
    Proxies the beans. The beans inside these proxies can be cleared.
    Author:
    Erki Ehtla
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String FACTORY_METHOD_NAME
      Name of the Spring beanFactory method, which returns a bean
    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyReplacer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void clearAllProxies()
      Clears the bean references inside all the proxies
      static java.lang.Object register​(java.lang.Object beanFactry, java.lang.Object bean, java.lang.Class<?>[] paramClasses, java.lang.Object[] paramValues)
      Creates a proxied Spring bean.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FACTORY_METHOD_NAME

        public static final java.lang.String FACTORY_METHOD_NAME
        Name of the Spring beanFactory method, which returns a bean
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProxyReplacer

        public ProxyReplacer()
    • Method Detail

      • clearAllProxies

        public static void clearAllProxies()
        Clears the bean references inside all the proxies
      • register

        public static java.lang.Object register​(java.lang.Object beanFactry,
                                                java.lang.Object bean,
                                                java.lang.Class<?>[] paramClasses,
                                                java.lang.Object[] paramValues)
        Creates a proxied Spring bean. Called from within WebApp code by modification of Spring classes
        Parameters:
        beanFactry - Spring beanFactory
        bean - Spring bean
        paramClasses - Parameter Classes of the Spring beanFactory method which returned the bean. The method is named ProxyReplacer.FACTORY_METHOD_NAME
        paramValues - Parameter values of the Spring beanFactory method which returned the bean. The method is named ProxyReplacer.FACTORY_METHOD_NAME
        Returns:
        Proxied bean