Interface ClassInjector
public interface ClassInjector
This class is internal and is hence not for public use. Its APIs are unstable and can change at
any time.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ProxyInjectionBuilder
proxyBuilder
(String classToProxy) Same as invokingproxyBuilder(String, String)
, but the resulting proxy will have the same name as the proxied class.proxyBuilder
(String classToProxy, String newProxyName) Create a builder for a proxy class which will be injected into the instrumentedClassLoader
.
-
Method Details
-
proxyBuilder
Create a builder for a proxy class which will be injected into the instrumentedClassLoader
. The generated proxy will delegate to the original class, which is loaded in a separate classloader.This removes the need for the proxied class and its dependencies to be visible (just like Advices) to the instrumented ClassLoader.
- Parameters:
classToProxy
- the fully qualified name of the class for which a proxy will be generatednewProxyName
- the fully qualified name to use for the generated proxy- Returns:
- a builder for further customizing the proxy.
ProxyInjectionBuilder.inject(InjectionMode)
must be called to actually inject the proxy.
-
proxyBuilder
Same as invokingproxyBuilder(String, String)
, but the resulting proxy will have the same name as the proxied class.- Parameters:
classToProxy
- the fully qualified name of the class for which a proxy will be generated- Returns:
- a builder for further customizing and injecting the proxy
-