获得动态的代理类.class文件的方法

        byte[] data = ProxyGenerator.generateProxyClass("$Proxy0",new Class[]{dynamicProxyTest.class});
        FileOutputStream out = null;
        try {
            File file=new File("E:\\$Proxy0.class");
            file.createNewFile();
            out = new FileOutputStream(file);
            out.write(data);
            out.close();
        }catch (Exception e) {
            e.printStackTrace();
        }

 

posted on 2019-05-27 16:34  认真的谁  阅读(222)  评论(0编辑  收藏  举报

导航