java.lang.Object
org.talend.sdk.component.runtime.manager.asm.Unsafes

public final class Unsafes extends Object
  • Constructor Details

  • 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