Package org.glassfish.hk2.external.org.objectweb.asm

Examples of org.glassfish.hk2.external.org.objectweb.asm.ClassWriter.toByteArray()


            final ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
            return new ASMContentHandler(cw) {
                @Override
                public void endDocument() throws SAXException {
                    try {
                        os.write(cw.toByteArray());
                    } catch (IOException e) {
                        throw new SAXException(e);
                    }
                }
            };
View Full Code Here


            Set<Constant> constants = new TreeSet<Constant>(
                    new ConstantComparator());
            constants.addAll(cp.values());

            cr = new ClassReader(cw.toByteArray());
            cw = new ClassWriter(0);
            Iterator<Constant> i = constants.iterator();
            while (i.hasNext()) {
                Constant c = i.next();
                c.write(cw);
View Full Code Here

                    throw new IOException("Cannot create directory "
                            + g.getParentFile());
                }
                OutputStream os = new FileOutputStream(g);
                try {
                    os.write(cw.toByteArray());
                } finally {
                    os.close();
                }
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.