Source Line Numbers from class files
"Nikhil C. Khedkar" <[email protected]>
| Newsgroups | gmane.comp.jakarta.bcel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I am working on getting the source code line numbers from class files using BCEL. ConstantPool constants = java_class.getConstantPool(); ConstantPoolGen cp = new ConstantPoolGen(constants); MethodGen methodGen = new MethodGen(method, java_class.getClassName(), cp); Instruction [] instructions = methodGen.getInstructionList().getInstructions(); LineNumberGen[] aLineNumberGen = methodGen.getLineNumbers(); I intend to use getSourceLine() API of LineNumberGen class. But the array aLineNumberGen is returned of 0 length. Is there any setting of the compiler that will save the line numbers in the class files, because of which it is not working right now. Thanks, Nikhil __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/