Does anyone knows a tool for Java (something like codedom for C#) that provides a way to generate Java code to a .java file?
EDIT: I'm building a platform the main objective of which is to automate an operation. Giving some input, I want to generate code for an external tool. So it isn't generation on runtime. I want to generate and output that to an actual file.