1

What is a good way to generate code from Java?

I have a visual FlowChart app, and want to integrate some code generation for specific graphs. So, I have mostly some objects (with names) and some connections between them (conditions).

I want these visual representation to transform in a specific type of scripting language.

Is there anything in java so that I can somehow define a template to generate my script? Eg tell the template what properties to take from the visual objects, and how to arrange them in the output language?

2 Answers 2

1

Try to use template engine like FreeMarker, you can generate any thing what you want.

Sign up to request clarification or add additional context in comments.

Comments

0

You can try Apache Velocity:

The Apache Velocity Engine is a free open-source templating engine.

There is a comparison between FreeMarker and Velocity here.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.