[英]Call Acceleo Generator From Java Class
I have to call an Acceleo generator from a Java Class I made. 我必须从我制作的Java类中调用Acceleo生成器。 How I can do it?
我该怎么办?
Thank You 谢谢
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). 您可以看看带有
[comment @main/]
注释的从模板自动生成的Java类(要快速获得示例,请使用File> New> Acceleo Module File并在高级选项中勾选“ Create an main Annotation”) 。
This automated class can be called from any other Java class you write by simply instantiating it and calling its 'initialize' and 'doGenerate' methods. 可以通过简单地实例化它并调用其“ initialize”和“ doGenerate”方法,从您编写的任何其他Java类中调用此自动化类。 Take a look at the generated
public static void main(String[] args)
method for a sample of its use. 查看生成的
public static void main(String[] args)
方法,以获取其用法示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.