blob: 3309276bc60fb8d7a392d61cabeba1f0b57d141f [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<h2 id="Java_Generation">Java Generation</h2>
<p>The goal of the Java Generation plug-in is to allow Java code generation from a Java model. Such a generation will fulfill some of the requirements for Legacy refactoring and migration. </p>
<i>Quality disclaimer: this generator is provided without any guarantee.</i>
<h3 id="Description">Description</h3>
<img align="middle" border="1" src="../../img/JavaM2T.PNG"/>
<p>This plug-in proposes Acceleo modules for generating Java files conforming to Java models. Templates are contained in two modules </p>
<li>Structures modules top level templates for generating classes/method/field declarations </li>
<li>Statements modules</li>
<p>Java models are obtained with the
<a href="../java_discoverer/user.html">Java Discoverer</a> component.
<p>Considering a Java legacy, a minimal migration/refactoring chain will involve </p>
<li>A Java model discovery step </li>
<li>A M2M transformation step </li>
<li>A Java generation code step with the current component</li>
<h3 id="User_manual">User manual</h3>
<p>A prerequisite is a Java model. Please refer to the
<a href="../java_discoverer/user.html"> Java Discoverer</a> user manual.
<p>To launch a Java generation, add
<i></i> in your plugin dependencies and use the
<i>GenerateJavaExtended</i> main method with input model and target folder as parameters. The code should look like this :
GenerateJavaExtended javaGenerator = new GenerateJavaExtended(URI.createFileURI("C:/.../my.javaxmi"),
new File("C:/.../myOutputFolder"), new ArrayList&lt;Object&gt;());
<p>Note : at the moment this documentation is written, there is no way of creating one Acceleo Launch Configuration based on one installed Acceleo module plugin.</p>