6 Replies Latest reply on May 2, 2009 5:19 AM by michael-schnell

    Generating source code in adition to class files

    hlovatt

      Hi,

      Have you ever thought of adding the ability for Javassist to spit out source as well as class files? In particular to have in CtClass methods in addition to toClass and writeFile that output source. EG toSource and writeSource.

      I am looking at using the annotation processing tool (apt) and this would be a useful feature since you can write source files with apt. I could then easily generate either a class file or a source file depending on what is most appropriate. The reason for wanting to produce a source file is that it is easier to debug programs when source is available and it is generally easier for someone to understand what is going on if they can see the generated source. However it is not always appropriate to generate source and therefore it would be nice to have the option of generating either.

      In the extreme case full decompilation from class to source would be nice, but even lesser facilities like only source generation if original source were available or only source if it is a new class would still be useful.

      Any thoughts of expansion into this area?

      Keep up the good work,

      Howard.