Class Unsafe

java.lang.Object
org.apache.webbeans.proxy.Unsafe

public class Unsafe extends Object
  • Constructor Details

    • Unsafe

      public Unsafe()
  • Method Details

    • defineAndLoadClass

      public <T> Class<T> defineAndLoadClass(ClassLoader classLoader, String proxyName, byte[] proxyBytes, Class<?> parent) throws ProxyGenerationException
      The 'defineClass' method on the ClassLoader is protected, thus we need to invoke it via reflection.
      Returns:
      the Class which got loaded in the classloader
      Throws:
      ProxyGenerationException
    • unsafeNewInstance

      public <T> T unsafeNewInstance(Class<T> clazz)