Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java code generation

I am looking for nice (java) code generation engine. I have found cglib but it is very poorly documented and I am not quite sure that it can generate actual java classes (files) and only dynamic classes. If I am wrong maybe someone knows has a link with an example.

Roman

like image 781
Roman Avatar asked Jan 20 '23 01:01

Roman


2 Answers

Have a look at codemodel, used with success for my projects.

like image 194
Frederic Heem Avatar answered Jan 28 '23 11:01

Frederic Heem


Didn't really try, but you may want to take a look at another code generation Java framework called Javassist, which also has pretty thorough tutorial. Also Hibernate changed code generation framework from cglib to javassist. Quote, explaining why:

The simple fact of the matter is that development on CGLIB has largely stopped. It happens. Developers for whatever reason (the reasons are their own) move on to new priorities.

Source

like image 44
jFrenetic Avatar answered Jan 28 '23 11:01

jFrenetic