Re: Re: invoke ClassReader#accept twice

Eric Bruneton <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
luc peuvrier at home wrote:
>>> using asm 3.3
>>> If I do:
>>> classReader.accept(classVisitorForStorable,ClassReader.SKIP_CODE|
>>> ClassReader.SKIP_DEBUG |ClassReader.SKIP_FRAMES);
>>> then
>>> classReader.accept(classVisitor, 0);
>>>
>>> the second visit do not visit code.
>>> I think it is a bug

the following code does not skip code in the second visit; it should be 
a bug in your code:

import java.io.PrintWriter;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.util.TraceClassVisitor;

public class Test {
     public static void main(String[] args) throws Exception {
         ClassReader cr = new ClassReader("Test");
         PrintWriter pw = new PrintWriter(System.out);
         cr.accept(new TraceClassVisitor(pw), ClassReader.SKIP_CODE | 
ClassReader.SKIP_FRAMES | ClassReader.SKIP_DEBUG);
         cr.accept(new TraceClassVisitor(pw), 0);
         pw.close();
     }
}

Eric
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.