File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Simple Java Code Generating tools Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Simple Java Code Generating tools" Watch "Simple Java Code Generating tools" New topic
Author

Simple Java Code Generating tools

Prash Negu
Ranch Hand

Joined: Apr 20, 2009
Posts: 45
Hi,

We need to generate many enum java files with constants, I was looking at simple code generating tools. Can somebody suggest me simple tools? I was thinking about Velocity templates.

Thanks,
Prashant
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
FreeMarker is similar to Velocity.


Ping & DNS - updated with new look and Ping home screen widget
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

I usually just rip out a Perl or Python script for this kind of stuff. I can put the data in a spreadsheet, save it as a CSV and run the script to generate code.

Back around Y2K I wrote an app called the EJBWizard that did something more complex: generated multiple files using a set of templates for each file type. But I myself haven't used it in about 4 years, and a planned enhancement never got done. One of my biggest supporters on that project worked at the top of the World Trade Center.

These days you can do pretty well using Eclipse templates, although, like the EJBWizard, it's best when you have fairly complex files with a few plugin values.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple Java Code Generating tools
 
Similar Threads
UML tool info required
generic Client Code to access arbitrary EJBs
JET and JMerge
EMF + UML 2 Tools [model to java code]
Generate next hexadecimal?