I am trying to edit a class by parsing it, adding some information to it and then writing it back. I was wondering if there is a tool (similar to something like Doclet (well that uses that same API as it seems to have what I am looking for)) that could accomplish this task?
By this I mean that I would like to take a java source file, load it into a (for example) ClassDoc
object and then add some content to it. and from that, write it all back to a file. I will be able to manage the writing back part myself as it is a simple matter of looking at the content and writing it to an ASCII file in a certain format but I am unsure of how to load a java source file into a class like ClassDoc
and then how do I edit is content?
Thanks for any pointers on this one,
ExtremeCoder