io.joynr.generator.proxy.ProxyGenerator Maven / Gradle / Ivy
package io.joynr.generator.proxy;
import com.google.inject.Inject;
import io.joynr.generator.proxy.InterfaceProxyTemplate;
import io.joynr.generator.util.JoynrJavaGeneratorExtensions;
import java.io.File;
import org.eclipse.xtext.generator.IFileSystemAccess;
import org.eclipse.xtext.xbase.lib.Extension;
import org.franca.core.franca.FInterface;
@SuppressWarnings("all")
public class ProxyGenerator {
@Inject
@Extension
private JoynrJavaGeneratorExtensions _joynrJavaGeneratorExtensions;
@Inject
private InterfaceProxyTemplate interfaceProxy;
public void doGenerate(final FInterface fInterface, final IFileSystemAccess fsa) {
String _packagePathWithJoynrPrefix = this._joynrJavaGeneratorExtensions.getPackagePathWithJoynrPrefix(fInterface, File.separator);
final String path = (_packagePathWithJoynrPrefix + File.separator);
String serviceName = this._joynrJavaGeneratorExtensions.joynrName(fInterface);
String _plus = (path + serviceName);
String _plus_1 = (_plus + "Proxy.java");
CharSequence _generate = this.interfaceProxy.generate(fInterface);
String _string = _generate.toString();
fsa.generateFile(_plus_1, _string);
}
}