-
1. Re: Debugging with Javassist
chiba Feb 27, 2004 10:09 AM (in response to hlship)As you might know, CtClass#writeFile() dumps
the contents of the class file. If you want to
do source-level debugging with the code generated
by Javassist, I have to extend Javassist a bit.
What kind of source-level debugging do your users
want? Do they want to see inserted code or newly
created class? -
2. Re: Debugging with Javassist
hlship Feb 27, 2004 10:32 AM (in response to hlship)As an example, what would be nice if Javassist would write the code-markup text to a temporary file and add line number information for its code that pointed to that file, so that a debugger (such as Eclipse) could step through the "source".
Currently, when users step into a method dynamically generated using Javassist, they get pretty much nothing ... there's no source to see!
The advantage of Javassist, that the markup text you write is very close to Java language, should be exploited for this purpose. -
3. Re: Debugging with Javassist
hlship Feb 27, 2004 10:40 AM (in response to hlship)Oh ... and both Tapestry and HiveMind don't modify existing sources, they always create new classes entirely (often as enhanced subclasses of existing, user-provided classes). I can see that trying to do what I suggest for full-bore AOP would be a great challenge, but for new classes created from "whole cloth", I think it is approachable (but should be an runtime selectable option).
-
4. Re: Debugging with Javassist
chiba Feb 27, 2004 12:21 PM (in response to hlship)OK, that's a good (and reasonable) suggestion.
Although I would not be able to implement it
very soon, I definitely put this to my Todo list. -
5. Re: Debugging with Javassist
bill.burke Feb 27, 2004 3:37 PM (in response to hlship)We need some recruits for Javassist. With JDK 1.5 coming up you're gonna need it.
Bill -
6. Re: Debugging with Javassist
chiba Feb 28, 2004 8:28 AM (in response to hlship)For meta data and generics?
Yes. -
7. Re: Debugging with Javassist
kevinconner Feb 28, 2004 2:53 PM (in response to hlship)I'm in the middle of the annotation stuff for the meta data. There's not that much more to do but I've been finding it hard to fit it in over the last week.
-
8. Re: Debugging with Javassist
kevinconner Feb 28, 2004 2:56 PM (in response to hlship)Sorry, forgot to add that I'm not looking at the compiler part yet, just the class info side of things.
-
9. Re: Debugging with Javassist
bill.burke Feb 29, 2004 12:25 AM (in response to hlship)Kevin, chiba means for metadata and generics for JDK 1.5. FYI, all, Kevin is working on an doclet tag -> attribute compiler. TO put doclet tags into .class files. A.K.A jsr-175 for JDK 1.4 and lower.
-
10. Re: Debugging with Javassist
kevinconner Mar 1, 2004 1:52 AM (in response to hlship)Hiya Bill.
Yep, I know. I was just letting him know that I am already working on some changes to javassist to support the metadata attributes in the class info stuff.
I was originally wrapping the javassist classes but decided that it made more sense to do it properly and add the support for this directly into the javassist code.
Kev -
11. Re: Debugging with Javassist
julien1 Mar 1, 2004 7:23 AM (in response to hlship)Bill, Kevin, you may want to look at this project :
http://attrib4j.sourceforge.net/index.html