Class Unsafes
java.lang.Object
org.talend.sdk.component.runtime.manager.asm.Unsafes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Class<T>defineAndLoadClass(ClassLoader classLoader, String proxyName, byte[] proxyBytes) The 'defineClass' method on the ClassLoader is private, thus we need to invoke it via reflection.
-
Constructor Details
-
Unsafes
public Unsafes()
-
-
Method Details
-
defineAndLoadClass
public static <T> Class<T> defineAndLoadClass(ClassLoader classLoader, String proxyName, byte[] proxyBytes) The 'defineClass' method on the ClassLoader is private, thus we need to invoke it via reflection.- Type Parameters:
T- the Class type- Parameters:
classLoader- the classloader to use to define the proxy.proxyName- the class name to define.proxyBytes- the bytes of the class to define.- Returns:
- the Class which got loaded in the classloader
-