Package org.ow2.asm.signature

Examples of org.ow2.asm.signature.SignatureReader.accept()


    @Override
    public void test() throws Exception {
        ClassReader cr = new ClassReader(is);
        ClassNode cn = new ClassNode();
        cr.accept(cn, 0);
        List<MethodNode> methods = cn.methods;
        for (int i = 0; i < methods.size(); ++i) {
            MethodNode method = methods.get(i);
            Analyzer<?> a = new Analyzer<BasicValue>(new BasicVerifier());
            a.analyze(cn.name, method);
View Full Code Here


            @Override
            public String get(Object key) {
                return "Foo";
            }
        };
        cr.accept(new RemappingClassAdapter(cw, new SimpleRemapper(map)), ClassReader.EXPAND_FRAMES);
    }
   
}
View Full Code Here

        mv.visitMaxs(maxStack, maxLocals);
        mv.visitEnd();
        cw.visitEnd();
        byte[] b = cw.toByteArray();
        ClassReader cr = new ClassReader(b);
        cr.accept(new EmptyVisitor() {
            @Override
            public MethodVisitor visitMethod(
                final int access,
                final String name,
                final String desc,
View Full Code Here

    @Override
    public void test() throws Exception {
        ClassReader cr = new ClassReader(is);
        ClassNode cn = new ClassNode();
        cr.accept(cn, 0);
        List<MethodNode> methods = cn.methods;
        for (int i = 0; i < methods.size(); ++i) {
            MethodNode method = methods.get(i);
            Analyzer<?> a = new Analyzer<SourceValue>(new SourceInterpreter());
            a.analyze(cn.name, method);
View Full Code Here

    public void test() throws Exception {
        ClassReader cr = new ClassReader(is);
        ClassWriter cw = new ClassWriter(0);
        ClassVisitor cv = new TraceClassVisitor(cw,
                new PrintWriter(new CharArrayWriter()));
        cr.accept(cv, new Attribute[] { new Comment(), new CodeComment() }, 0);
        assertEquals(cr, new ClassReader(cw.toByteArray()));
    }
}
View Full Code Here

            return;
        }

        StringWriter sw = new StringWriter();
        ASMifierClassVisitor cv = new ASMifierClassVisitor(new PrintWriter(sw));
        cr.accept(cv, new Attribute[] { new Comment(), new CodeComment() }, 0);

        String generated = sw.toString();

        byte[] generatorClassData;
        try {
View Full Code Here

    @Override
    public void test() throws Exception {
        ClassReader cr = new ClassReader(is);
        ClassWriter cw = new ClassWriter(0);
        cr.accept(new CheckClassAdapter(cw), 0);
        assertEquals(cr, new ClassReader(cw.toByteArray()));
    }
}
View Full Code Here

public class Analysis implements Opcodes {

    public static void main(final String[] args) throws Exception {
        ClassReader cr = new ClassReader("Analysis");
        ClassNode cn = new ClassNode();
        cr.accept(cn, ClassReader.SKIP_DEBUG);

        List<MethodNode> methods = cn.methods;
        for (int i = 0; i < methods.size(); ++i) {
            MethodNode method = methods.get(i);
            if (method.instructions.size() > 0) {
View Full Code Here

        // adapts the class on the fly
        try {
            ClassReader cr = new ClassReader(is);
            ClassWriter cw = new ClassWriter(0);
            ClassVisitor cv = new TraceFieldClassAdapter(cw);
            cr.accept(cv, 0);
            b = cw.toByteArray();
        } catch (Exception e) {
            throw new ClassNotFoundException(name, e);
        }
View Full Code Here

        {
            cr = new ClassReader(new FileInputStream(args[i]));
        } else {
            cr = new ClassReader(args[i]);
        }
        cr.accept(new JasminifierClassAdapter(new PrintWriter(System.out, true),
                null),
                flags | ClassReader.EXPAND_FRAMES);
    }

    /**
 
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.