Call Acceleo Generator From Java Class

969 views Asked by At

I have to call an Acceleo generator from a Java Class I made. How I can do it?

Thank You

1

There are 1 answers

2
Kellindil On

You could take a look at the Java class automatically generated from templates with the [comment @main/] comment (to quickly get an example, use File > New > Acceleo Module File and tick "Create a main annotation" in the advanced options).

This automated class can be called from any other Java class you write by simply instantiating it and calling its 'initialize' and 'doGenerate' methods. Take a look at the generated public static void main(String[] args) method for a sample of its use.