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:
wide adoption
although is byte-code generator, may be used in combination of source-code generation...
best for creating proxy, interceptor, etc...
Con:
but it's a byte-code generation, not a source code generator?
ByteBuddy
https://github.com/bingtimren/bytebuddy-example
Tried and works great!
CodeModel
https://codemodel.java.net/
Con:
not active for some years
where's documents besides JavaDoc?
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++