Class EnhancerProxyCreater


  • public class EnhancerProxyCreater
    extends java.lang.Object
    Creates a Cglib proxy instance along with the neccessary Callback classes. Uses either the repackaged version of Cglib (Spring >= 3.2) or the stand-alone version (Spring < 3.2).
    Author:
    Erki Ehtla
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CGLIB_PACKAGE  
      static java.lang.String SPRING_PACKAGE  
    • Constructor Summary

      Constructors 
      Constructor Description
      EnhancerProxyCreater​(java.lang.ClassLoader loader, java.security.ProtectionDomain pd)  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object createProxy​(java.lang.Object beanFactry, java.lang.Object bean, java.lang.Class<?>[] paramClasses, java.lang.Object[] paramValues)
      Creates a Cglib proxy instance along with the neccessary Callback classes, if those have not been created already.
      static boolean isSupportedCglibProxy​(java.lang.Object bean)  
      • Methods inherited from class java.lang.Object

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

      • EnhancerProxyCreater

        public EnhancerProxyCreater​(java.lang.ClassLoader loader,
                                    java.security.ProtectionDomain pd)
    • Method Detail

      • isSupportedCglibProxy

        public static boolean isSupportedCglibProxy​(java.lang.Object bean)
      • createProxy

        public static java.lang.Object createProxy​(java.lang.Object beanFactry,
                                                   java.lang.Object bean,
                                                   java.lang.Class<?>[] paramClasses,
                                                   java.lang.Object[] paramValues)
        Creates a Cglib proxy instance along with the neccessary Callback classes, if those have not been created already. Uses either the repackaged version of Cglib (Spring >= 3.2) or the stand-alone version (Spring < 3.2).
        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: