Class ProxyUtilities


  • public class ProxyUtilities
    extends java.lang.Object
    Utilities around proxying
    • Field Detail

      • proxyCreationLock

        private static final java.lang.Object proxyCreationLock
      • superClassToDelegator

        private final java.util.HashMap<java.lang.ClassLoader,​DelegatingClassLoader> superClassToDelegator
    • Constructor Detail

      • ProxyUtilities

        public ProxyUtilities()
    • Method Detail

      • secureCreate

        private <T> T secureCreate​(java.lang.Class<?> superclass,
                                   java.lang.Class<?>[] interfaces,
                                   javassist.util.proxy.MethodHandler callback,
                                   boolean useJDKProxy,
                                   ServiceLocator anchor)
        We put the anchor as the value even though we don't use it in order to make it easier to catch memory leaks here. See MemoryTest
        Parameters:
        superclass -
        interfaces -
        callback -
        useJDKProxy -
        anchor - This is put into the WeakMap to make sure that IF this map should leak that it will leak big, making it easier to detect
        Returns:
      • releaseCache

        public void releaseCache()