+1 for using the class loader of the annotation type, but I still would use a privileged action:
ClassLoader classLoader = ReflectionHelper.getClassLoaderFromClass(descriptor.type()); Class<T> proxyClass = ( Class<T> ) Proxy.getProxyClass( classLoader, descriptor.type() );
+1 for using the class loader of the annotation type, but I still would use a privileged action: