A Java API to generate Java source files [closed]

Sun provides an API called CodeModel for generating Java source files using an API. It’s not the easiest thing to get information on, but it’s there and it works extremely well.

The easiest way to get hold of it is as part of the JAXB 2 RI – the XJC schema-to-java generator uses CodeModel to generate its java source, and it’s part of the XJC jars. You can use it just for the CodeModel.

Grab it from http://codemodel.java.net/

Leave a Comment