Java Code Generation

My study of Java code generation tools

References

http://en.wikipedia.org/wiki/Comparison_of_code_generation_tools

Template engine

General purpose template engine such as Velocity works. Anything more specific and better?

CGLib

Pro:

Con:

ByteBuddy

https://github.com/bingtimren/bytebuddy-example

Tried and works great!

CodeModel

https://codemodel.java.net/

Con:

Andromda

This is not general purpose code generation but has a strong binding to certain technologies like JFace, etc.

XText

http://www.eclipse.org/Xtext/

"Framework for development of programming languages and domain specific languages"

Web-site looks mature and sophisticated

Overkill? for creating a new language....

XTend - still like another language, not a source generator

OpenArchitectureWare

Now moved to Eclipse Modeling Project, too complex to study at this time

Lombok

Targeting boilerplate with annotations

Spoon

Developing until 2014 April!

Gives complete, find-grained Java metamodel where any element can be accessed reading / modification

Take input source code and produces transformed source code to be compiled

Free

Looks promising!

AtomWeaver

(Atom-based Software Engineering)

A price tag with full mode.

ABSE

Looks quite powerful but also very complex

Windows only?

Anyone actually uses it?

PMD

No... it's a source code analyzer to find common programming flaws....

RevGen

Database to java....

JavaGen Agile/XSLT

No....

Jace

no, its for integration of C++