Commit 0388f81f authored by Lionel Seinturier's avatar Lionel Seinturier

Remove usage of JuliacConfig

parent b76a0265
...@@ -68,7 +68,6 @@ import org.objectweb.fractal.julia.type.BasicComponentType; ...@@ -68,7 +68,6 @@ import org.objectweb.fractal.julia.type.BasicComponentType;
import org.objectweb.fractal.julia.type.BasicInterfaceType; import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliac.api.generator.SourceCodeGeneratorItf; import org.objectweb.fractal.juliac.api.generator.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.StringHelper; import org.objectweb.fractal.juliac.commons.lang.StringHelper;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.desc.AbstractADLSupportImpl; import org.objectweb.fractal.juliac.desc.AbstractADLSupportImpl;
import org.objectweb.fractal.juliac.desc.AttributeDesc; import org.objectweb.fractal.juliac.desc.AttributeDesc;
import org.objectweb.fractal.juliac.desc.BindingDesc; import org.objectweb.fractal.juliac.desc.BindingDesc;
...@@ -106,8 +105,7 @@ public class EMFParserSupportImpl extends AbstractADLSupportImpl<Composite> { ...@@ -106,8 +105,7 @@ public class EMFParserSupportImpl extends AbstractADLSupportImpl<Composite> {
* being null when the resource is stored in a jar file. * being null when the resource is stored in a jar file.
*/ */
String adlFileName = adl.replace('.','/')+".composite"; String adlFileName = adl.replace('.','/')+".composite";
JuliacConfig jconf = jc.getJuliacConfig(); ClassLoader loader = jc.getClassLoader();
ClassLoader loader = jconf.getClassLoader();
InputStream is = loader.getResourceAsStream(adlFileName); InputStream is = loader.getResourceAsStream(adlFileName);
boolean exist = (is != null); boolean exist = (is != null);
return exist; return exist;
...@@ -148,8 +146,7 @@ public class EMFParserSupportImpl extends AbstractADLSupportImpl<Composite> { ...@@ -148,8 +146,7 @@ public class EMFParserSupportImpl extends AbstractADLSupportImpl<Composite> {
protected Composite innerparse( String adl, Map<Object,Object> context ) protected Composite innerparse( String adl, Map<Object,Object> context )
throws IOException { throws IOException {
JuliacConfig jconf = jc.getJuliacConfig(); ClassLoader loader = jc.getClassLoader();
ClassLoader loader = jconf.getClassLoader();
String adlFileName = adl.replace('.','/')+".composite"; String adlFileName = adl.replace('.','/')+".composite";
URL url = loader.getResource(adlFileName); URL url = loader.getResource(adlFileName);
......
...@@ -31,7 +31,6 @@ import org.junit.Assert; ...@@ -31,7 +31,6 @@ import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.objectweb.fractal.juliac.Juliac; import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.desc.AttributeDesc; import org.objectweb.fractal.juliac.desc.AttributeDesc;
import org.objectweb.fractal.juliac.desc.ComponentDesc; import org.objectweb.fractal.juliac.desc.ComponentDesc;
import org.objectweb.fractal.juliac.module.ADLParserSupportItf; import org.objectweb.fractal.juliac.module.ADLParserSupportItf;
...@@ -51,7 +50,6 @@ public class EMFParserSupportImplTestCase { ...@@ -51,7 +50,6 @@ public class EMFParserSupportImplTestCase {
@Before @Before
public void setUp() throws IOException { public void setUp() throws IOException {
jc = new Juliac(); jc = new Juliac();
jc.setJuliacConfig(new JuliacConfig());
emfps = new EMFParserSupportImpl(); emfps = new EMFParserSupportImpl();
emfps.init(jc); emfps.init(jc);
} }
......
...@@ -133,7 +133,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator { ...@@ -133,7 +133,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
final String signature = it.getFcItfSignature(); final String signature = it.getFcItfSignature();
final Class<?> cl = jc.loadClass(signature); final Class<?> cl = jc.loadClass(signature);
final String pkgRoot = jc.getJuliacConfig().getPkgRoot(); final String pkgRoot = jc.getPkgRoot();
if( itname.endsWith("-controller") || itname.equals("component") ) { if( itname.endsWith("-controller") || itname.equals("component") ) {
pcg = pcg =
...@@ -172,7 +172,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator { ...@@ -172,7 +172,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
final String signature = it.getFcItfSignature(); final String signature = it.getFcItfSignature();
final Class<?> cl = jc.loadClass(signature); final Class<?> cl = jc.loadClass(signature);
final String pkgRoot = jc.getJuliacConfig().getPkgRoot(); final String pkgRoot = jc.getPkgRoot();
String itname = it.getFcItfName(); String itname = it.getFcItfName();
if( itname.endsWith("-controller") || itname.equals("component") ) { if( itname.endsWith("-controller") || itname.equals("component") ) {
......
...@@ -108,7 +108,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator { ...@@ -108,7 +108,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
final String signature = it.getFcItfSignature(); final String signature = it.getFcItfSignature();
final Class<?> cl = jc.loadClass(signature); final Class<?> cl = jc.loadClass(signature);
final String pkgRoot = jc.getJuliacConfig().getPkgRoot(); final String pkgRoot = jc.getPkgRoot();
ProxyClassGeneratorItf pcg = null; ProxyClassGeneratorItf pcg = null;
String itname = it.getFcItfName(); String itname = it.getFcItfName();
...@@ -153,7 +153,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator { ...@@ -153,7 +153,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
final String signature = it.getFcItfSignature(); final String signature = it.getFcItfSignature();
final Class<?> cl = jc.loadClass(signature); final Class<?> cl = jc.loadClass(signature);
final String pkgRoot = jc.getJuliacConfig().getPkgRoot(); final String pkgRoot = jc.getPkgRoot();
String itname = it.getFcItfName(); String itname = it.getFcItfName();
if( itname.endsWith("-controller") || itname.equals("component") ) { if( itname.endsWith("-controller") || itname.equals("component") ) {
......
...@@ -142,7 +142,7 @@ extends ClassGenerator { ...@@ -142,7 +142,7 @@ extends ClassGenerator {
* Return the name of the class generated by this generator. * Return the name of the class generated by this generator.
*/ */
public String getTargetTypeName() { public String getTargetTypeName() {
final String pkgRoot = jc.getJuliacConfig().getPkgRoot(); final String pkgRoot = jc.getPkgRoot();
final String targetClassName = pkgRoot + contentClassName + SUFFIX; final String targetClassName = pkgRoot + contentClassName + SUFFIX;
return targetClassName; return targetClassName;
} }
......
...@@ -27,7 +27,6 @@ import java.io.IOException; ...@@ -27,7 +27,6 @@ import java.io.IOException;
import org.junit.Test; import org.junit.Test;
import org.objectweb.fractal.juliac.Juliac; import org.objectweb.fractal.juliac.Juliac;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.module.JuliacModuleItf; import org.objectweb.fractal.juliac.module.JuliacModuleItf;
...@@ -48,8 +47,6 @@ public class FCOOCtrlSourceCodeGeneratorTestCase { ...@@ -48,8 +47,6 @@ public class FCOOCtrlSourceCodeGeneratorTestCase {
public void testTwoGenerators() throws IOException { public void testTwoGenerators() throws IOException {
Juliac jc = new Juliac(); Juliac jc = new Juliac();
JuliacConfig jconf = new JuliacConfig();
jc.setJuliacConfig(jconf);
JuliacModuleItf oo = JuliacModuleItf oo =
new org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator(); new org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment