Package org.apache.tapestry5.internal.plastic.asm

Examples of org.apache.tapestry5.internal.plastic.asm.ClassReader.accept()


            boolean singleInputDocument = inRepresentation == SINGLE_XML;
            if (inRepresentation == BYTECODE) { // read bytecode and process it
                // with handler
                ClassReader cr = new ClassReader(readEntry(zis, ze));
                cr.accept(new SAXClassAdapter(handler, singleInputDocument), 0);

            } else { // read XML and process it with handler
                XMLReader reader = XMLReaderFactory.createXMLReader();
                reader.setContentHandler(handler);
                reader.parse(new InputSource(
View Full Code Here


                || args[i].indexOf('/') > -1) {
            cr = new ClassReader(new FileInputStream(args[i]));
        } else {
            cr = new ClassReader(args[i]);
        }
        cr.accept(new TraceClassVisitor(null, new ASMifier(), new PrintWriter(
                System.out)), flags);
    }

    // ------------------------------------------------------------------------
    // Classes
View Full Code Here

                || args[i].indexOf('/') > -1) {
            cr = new ClassReader(new FileInputStream(args[i]));
        } else {
            cr = new ClassReader(args[i]);
        }
        cr.accept(new TraceClassVisitor(new PrintWriter(System.out)), flags);
    }

    // ------------------------------------------------------------------------
    // Classes
    // ------------------------------------------------------------------------
View Full Code Here

            ConstantPool cp = new ConstantPool();
            ClassReader cr = new ClassReader(new FileInputStream(f));
            ClassWriter cw = new ClassWriter(0);
            ClassConstantsCollector ccc = new ClassConstantsCollector(cw, cp);
            ClassOptimizer co = new ClassOptimizer(ccc, remapper);
            cr.accept(co, ClassReader.SKIP_DEBUG);

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

            Iterator<Constant> i = constants.iterator();
            while (i.hasNext()) {
                Constant c = i.next();
                c.write(cw);
            }
            cr.accept(cw, ClassReader.SKIP_DEBUG);

            if (MAPPING.get(cr.getClassName() + "/remove") != null) {
                return;
            }
            String n = remapper.mapType(cr.getClassName());
View Full Code Here

        InputStream inputStream = classLoader.getResourceAsStream(location);
        BufferedInputStream bis = new BufferedInputStream(inputStream);
        ClassReader classReader = new ClassReader(inputStream);
        inputStream.close();
        bis.close();
        classReader.accept(classNode, 0);
        return classNode;
       
    }

    public ClassInstantiator getClassInstantiator(String className)
View Full Code Here

                }
                out.putNextEntry(ze);
                if (ze.getName().endsWith(".class")) {
                    ClassReader cr = new ClassReader(zf.getInputStream(ze));
                    // cr.accept(new ClassDump(), 0);
                    cr.accept(new ClassVerifier(), 0);
                }
                InputStream is = zf.getInputStream(ze);
                int n;
                do {
                    n = is.read(buf, 0, buf.length);
View Full Code Here

    {
        ClassReader cr = new ClassReader(bytecode);

        ClassNode result = new ClassNode();

        cr.accept(result, 0);

        return result;
    }
}
View Full Code Here

        InputStream inputStream = classLoader.getResourceAsStream(location);
        BufferedInputStream bis = new BufferedInputStream(inputStream);
        ClassReader classReader = new ClassReader(inputStream);
        inputStream.close();
        bis.close();
        classReader.accept(classNode, 0);
        return classNode;
       
    }

    public ClassInstantiator getClassInstantiator(String className)
View Full Code Here

                }
                out.putNextEntry(ze);
                if (ze.getName().endsWith(".class")) {
                    ClassReader cr = new ClassReader(zf.getInputStream(ze));
                    // cr.accept(new ClassDump(), 0);
                    cr.accept(new ClassVerifier(), 0);
                }
                InputStream is = zf.getInputStream(ze);
                int n;
                do {
                    n = is.read(buf, 0, buf.length);
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.