Class ProxyUtilities

java.lang.Object
org.jvnet.hk2.internal.ProxyUtilities

public class ProxyUtilities extends Object
Utilities around proxying
  • Field Details

  • Constructor Details

    • ProxyUtilities

      public ProxyUtilities()
  • Method Details

    • secureCreate

      private <T> T secureCreate(Class<?> superclass, 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:
    • generateProxy

      public <T> T generateProxy(Class<?> requestedClass, ServiceLocatorImpl locator, ActiveDescriptor<T> root, ServiceHandleImpl<T> handle, Injectee injectee)
    • releaseCache

      public void releaseCache()