On Mon, Jul 30, 2012 at 1:17 AM, Thilo Goetz <twgo...@gmx.de> wrote: > Hi Sébastien, > > On 30/07/12 08:16, Sébastien Brisard wrote: > > Hi Thilo, > > > > I'm a committer to the Apache-Commons Math project. I crossed the > > message you've posted recently on the community ML, regarding > > automatic code generation. I would be very interested by such a tool, > > with no particular restriction on the license (as this would be for > > personal use). I was unaware of codemodel. I had a look to the API, it > > seems to fulfill my needs. However, before I start using it, I would > > like to have your advice. Would you recommend this library? Is there > > any other good alternative you would also recommend? > > I haven't looked at codemodel in any detail since for me, the > license is a requirement. So I knew right away that codemodel > wouldn't work for me. All I can say is that unfortunately, it > is the only OS library I found that has such a nice API and is > independent of any particular modeling approach. If you don't > mind dragging in EMF, or if your project needs to run in Eclipse > anyway, you can look at the tools that come with or at least > run in Eclipse. Again, that was not an option for me. > > Not sure that helped, but that's all I have. I'm currently > thinking of doing my own library, based roughly on the codemodel > approach. If it ever gets to a stage where it is generally > useful, Apache Commons might be a good home for it. We'll see. > > --Thilo > > > > > I would be grateful for any hint you could give me on this topic. > > > > Thanks a lot for your time! > > > > Best regards, > > Sébastien > > > >> > >> As part of my project, I would like to generate Java source code. > >> I'm looking for a library like codemodel, which is part of JAXB > >> (http://codemodel.java.net/), except that it shouldn't be GPLed. > >> I'm not interested in anything that uses string templates, so > >> please don't point me at any templating engines. > >> >
Have you looked into Xtext/Xtend from Eclipse, they allow you to define models and create templates that can be used to generate java (or not) artifacts from that. [1] http://www.eclipse.org/Xtext/ -- Luciano Resende http://people.apache.org/~lresende http://twitter.com/lresende1975 http://lresende.blogspot.com/