Package org.jvnet.hk2.internal
Class ProxyUtilities
java.lang.Object
org.jvnet.hk2.internal.ProxyUtilities
Utilities around proxying
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Object
private final HashMap
<ClassLoader, DelegatingClassLoader> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
generateProxy
(Class<?> requestedClass, ServiceLocatorImpl locator, ActiveDescriptor<T> root, ServiceHandleImpl<T> handle, Injectee injectee) void
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.
-
Field Details
-
proxyCreationLock
-
superClassToDelegator
-
-
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()
-