Re: Re: [3.3.1] Reading source file and line number attributes w/ Tree API
Howard Lewis Ship <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the pointers. Here's what I came up with: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/PlasticProxyFactoryImpl.java?view=markup Probably could be done a bit more efficiently using the streaming API than the Tree API but that isn't a critical issue here. On Mon, May 2, 2011 at 5:19 PM, Howard Lewis Ship <[email protected]> wrote: > Thanks for the pointers. Here's what I came up with: > > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/PlasticProxyFactoryImpl.java?view=markup > > Probably could be done a bit more efficiently using the streaming API > than the Tree API but that isn't a critical issue here. > > On Mon, May 2, 2011 at 2:38 PM, Eugene Kuleshov <[email protected]> wrote: >> Generally you don't need an Attribute class. Both, class name and line >> numbers already loaded into the tree api. See ClassNode.sourceFile and >> LineNumberNode. >> >> regards, >> Eugene >> >> On Mon, May 2, 2011 at 5:27 PM, Howard Lewis Ship <[email protected]> wrote: >>> Are there examples for reading this information? I'm interested in >>> getting the source file name and line number for a method or >>> constructor, but (primarily) use the Tree API. >>> >>> If I'm interpreting the API docs correctly, an Attribute instance ends >>> up serving as a factory for instances of that type via its protected >>> read() method. I think I can guess how to implement this using >>> http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#79869 >>> ... but I'd just as soon use someone else's solution, if it's readily >>> available. >>> >>> -- >>> Howard M. Lewis Ship >> >> >> -- >> 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 >> >> > > > > -- > Howard M. Lewis Ship > > Creator of Apache Tapestry > > The source for Tapestry training, mentoring and support. Contact me to > learn how I can get you up and productive in Tapestry fast! > > (971) 678-5210 > http://howardlewisship.com > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
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