Class ProxyFactory<T>

  • All Implemented Interfaces:
    ConstructionProxyFactory<T>

    final class ProxyFactory<T>
    extends java.lang.Object
    implements ConstructionProxyFactory<T>
    Builds a construction proxy that can participate in AOP. This class manages applying type and method matchers to come up with the set of intercepted methods.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private net.sf.cglib.proxy.Callback[] callbacks  
      private java.lang.Class<T> declaringClass  
      private InjectionPoint injectionPoint  
      private com.google.common.collect.ImmutableMap<java.lang.reflect.Method,​java.util.List<org.aopalliance.intercept.MethodInterceptor>> interceptors  
      private static java.util.logging.Logger logger  
      private java.util.List<java.lang.reflect.Method> methods  
      private BytecodeGen.Visibility visibility
      PUBLIC is default; it's used if all the methods we're intercepting are public.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ConstructionProxy<T> create()
      Gets a construction proxy for the given constructor.
      com.google.common.collect.ImmutableMap<java.lang.reflect.Method,​java.util.List<org.aopalliance.intercept.MethodInterceptor>> getInterceptors()
      Returns the interceptors that apply to the constructed type.
      • Methods inherited from class java.lang.Object

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

      • logger

        private static final java.util.logging.Logger logger
      • interceptors

        private final com.google.common.collect.ImmutableMap<java.lang.reflect.Method,​java.util.List<org.aopalliance.intercept.MethodInterceptor>> interceptors
      • declaringClass

        private final java.lang.Class<T> declaringClass
      • methods

        private final java.util.List<java.lang.reflect.Method> methods
      • callbacks

        private final net.sf.cglib.proxy.Callback[] callbacks
      • visibility

        private BytecodeGen.Visibility visibility
        PUBLIC is default; it's used if all the methods we're intercepting are public. This impacts which classloader we should use for loading the enhanced class