Need help with source code line number
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Hi.
I have a project where I want to map classes, the class' method signatures and
method invokations within the class to the corresponding line numbers in the
java source. Basically what I want to do is to build a library (db) where I can
make lookups of type: who overrides this method, where is this method called
from, etc.
By extending ClassAdapter I find the method "properties" of the class and by
extending Method adapter I can find method invocations and the line number
where the method invokation took place.
I can however not find a way to get the line numbers for the method itself.
E.g. If I have a class like
class Foo {
public String toString() {
return "foo".toUpperCase();
}
}
then I want to be able to somehow find out that the "public String toString()"
starts on line 2 of the class and ends at line 4.
Any ideas on what to do? I'm using ASM 3.3.1 (simply because I couldn't find
4RC2 in any maven repo).
Best regards,
Jörgen
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