Search code examples
javajcodemodel

Adding copyright info generated java code - Jcodemodel


I am generating java source code using JCodeModel. I would to add copyright information to the generated code. Is this possible currently?

I tried using javadoc()in JDefinedClass , it adds the information only above the class definition.


Solution

  • com.sun.codemodel.writer.PrologCodeWriter is exactly what you are looking for