Such a tool should be great but the implementation
would not be a simple task. First of all, decompiling
Java bytecode to appropriate source code is not always
possible (well, might be possible but difficult). Even
reflecting changes on bytecode to the original source file is
not easy since some bytecode manipulation by Javassist
is hard to represent in Java.
I agree your idea is great but I don't have a plan to do
it in near future...
There is a tool called "jode" which is 100% Java. This might work well enough, though it may not be able to handle modified .class files.
Thanks for the tip - I will give jode a try
I think using a Java decompiler is a good idea.
However, please don't say "Javassist has a bug!" if you see a decompiler fails to decompile the bytecode modified by Javassist. :-)
I will keep that in mind, that a decompiler might struggle with a manipulated bytecode. Thanks for the advice.
For your interest Dennis Sosnoski, who as written about Javassist - I think you reference his articles, is talking about writting a library that can manipulate bytecodes and generate source.
His application is the same as mine, i.e. he wants to use apt and has also had trouble debugging code for which no source exists.
I think like me he is mainly interested in generating source from classes written from scratch, not from existing classes that have had their bytecode manipulated.
Also people are developing plug-ins for IDEs that allow source manipulation, e.g. JackPot for Netbeans. I think people are working on ones for Eclipse and IdeaJ also. I assume all this interest is like myself, because of apt.