Package org.apache.webbeans.proxy
Class Unsafe
- java.lang.Object
-
- org.apache.webbeans.proxy.Unsafe
-
public class Unsafe extends Object
-
-
Constructor Summary
Constructors Constructor Description Unsafe()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Class<T>defineAndLoadClass(ClassLoader classLoader, String proxyName, byte[] proxyBytes, Class<?> parent)The 'defineClass' method on the ClassLoader is protected, thus we need to invoke it via reflection.<T> TunsafeNewInstance(Class<T> clazz)
-
-
-
Method Detail
-
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)
-
-