Commit 22edb585 authored by Lionel Seinturier's avatar Lionel Seinturier

Move all service methods to Juliac.

parent cc22ab1d
......@@ -51,7 +51,7 @@ public class EMFParserSupportImplTestCase {
@Before
public void setUp() throws IOException {
jc = new Juliac();
jc.setJuliacConfig(new JuliacConfig(jc));
jc.setJuliacConfig(new JuliacConfig());
emfps = new EMFParserSupportImpl();
emfps.init(jc);
}
......
......@@ -38,7 +38,6 @@ import org.objectweb.fractal.juliac.api.MembraneLoaderItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.commons.lang.annotation.AnnotationHelper;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.conf.JulietLoader;
import org.objectweb.fractal.juliac.desc.NoSuchControllerDescriptorException;
import org.objectweb.fractal.juliac.opt.InitializerClassGenerator;
......@@ -74,9 +73,8 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* based configuration mechanism for defining membranes.
*/
JuliacConfig jconf = jc.getJuliacConfig();
mloader =
jconf.loadModuleIfNew(
jc.loadModuleIfNew(
JulietLoader.class.getName(), MembraneLoaderItf.class );
mloader.put(KOCK_PREFIX+SCAPrimitive.NAME,SCAPrimitive.class);
......
......@@ -35,7 +35,6 @@ import org.objectweb.fractal.juliac.api.FCSourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.commons.lang.annotation.AnnotationHelper;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.conf.JulietLoader;
import org.objectweb.fractal.juliac.desc.SimpleMembraneDesc;
import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;
......@@ -72,9 +71,8 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
* registered before the current one (see the associated JUnit test).
*/
JuliacConfig jconf = jc.getJuliacConfig();
mloader =
jconf.loadModuleIfNew(
jc.loadModuleIfNew(
JulietLoader.class.getName(), JulietLoader.class );
mloader.put(SCAPrimitive.NAME,SCAPrimitive.class);
......
......@@ -47,7 +47,6 @@ import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.commons.lang.GenericClassHelper;
import org.objectweb.fractal.juliac.commons.lang.reflect.FieldHelper;
import org.objectweb.fractal.juliac.conf.JuliacConfig;
import org.objectweb.fractal.juliac.conf.JulietLoader;
import org.objectweb.fractal.juliac.conf.MembraneHelper;
import org.objectweb.fractal.juliac.desc.ComponentDesc;
......@@ -94,13 +93,11 @@ public class TinfiParserSupportImpl implements ADLParserSupportItf {
public void init( Juliac jc ) {
this.jc = jc;
JuliacConfig jconf = jc.getJuliacConfig();
jconf.register(SERVICE_TYPE,this);
jc.register(SERVICE_TYPE,this);
}
public void close( Juliac jc ) {
JuliacConfig jconf = jc.getJuliacConfig();
jconf.unregister(SERVICE_TYPE,this);
jc.unregister(SERVICE_TYPE,this);
}
......@@ -319,8 +316,7 @@ public class TinfiParserSupportImpl implements ADLParserSupportItf {
MembraneHelper.getMembraneDef(mAnnot,uc.toString(cl));
Membrane mdef = mdefcl.getAnnotation(Membrane.class);
controller = mdef.desc();
JuliacConfig jconf = jc.getJuliacConfig();
List<JulietLoader> mloaders = jconf.lookup(JulietLoader.class);
List<JulietLoader> mloaders = jc.lookup(JulietLoader.class);
for( MembraneLoaderItf mloader : mloaders ) {
mloader.put(controller,mdefcl);
}
......
......@@ -48,7 +48,7 @@ public class FCOOCtrlSourceCodeGeneratorTestCase {
public void testTwoGenerators() throws IOException {
Juliac jc = new Juliac();
JuliacConfig jconf = new JuliacConfig(jc);
JuliacConfig jconf = new JuliacConfig();
jc.setJuliacConfig(jconf);
JuliacModuleItf oo =
......
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