Commit 5fd32bfc authored by Lionel Seinturier's avatar Lionel Seinturier

Reduce dependency to the type hierarchy.

Remove uneeded membraneDesc parameter for fcinterface implementation class generators.
parent 5ebb3358
......@@ -37,8 +37,6 @@ 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.ComponentDesc;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.desc.NoSuchControllerDescriptorException;
import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;
import org.objectweb.fractal.juliac.proxy.ProxyClassGeneratorItf;
......@@ -114,8 +112,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* Return the source code generator for component interfaces.
*/
@Override
public ProxyClassGeneratorItf getInterfaceClassGenerator(
InterfaceType it, MembraneDesc<ComponentDesc> membraneDesc ) {
public ProxyClassGeneratorItf getInterfaceClassGenerator(InterfaceType it) {
ProxyClassGeneratorItf pcg = null;
String itname = it.getFcItfName();
......@@ -131,8 +128,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
if( itname.endsWith("-controller") || itname.equals("component") ) {
pcg =
new InterfaceImplementationClassGenerator(
it, cl, pkgRoot, membraneDesc, false );
new InterfaceImplementationClassGenerator(it,cl,pkgRoot,false);
}
else {
if( it.isFcClientItf() ) {
......@@ -146,13 +142,11 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* which corresponds to the real implementation.
*/
pcg =
new ClientInterfaceClassGenerator(
it,cl,pkgRoot,membraneDesc,false);
new ClientInterfaceClassGenerator(it,cl,pkgRoot,false);
}
else {
pcg =
new ServerInterfaceClassGenerator(
it,cl,pkgRoot,membraneDesc,false);
new ServerInterfaceClassGenerator(it,cl,pkgRoot,false);
}
}
......@@ -184,8 +178,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* for Julia control interfaces.
*/
SourceCodeGeneratorItf cg =
new InterfaceImplementationClassGenerator(
it,cl,pkgRoot,null,false);
new InterfaceImplementationClassGenerator(it,cl,pkgRoot,false);
jc.generateSourceCode(cg);
}
else {
......@@ -196,7 +189,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
// Server (input) interface implementation
SourceCodeGeneratorItf cg =
new ServerInterfaceClassGenerator(it,cl,pkgRoot,null,false);
new ServerInterfaceClassGenerator(it,cl,pkgRoot,false);
jc.generateSourceCode(cg);
if( it.isFcClientItf() ) {
......@@ -206,8 +199,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* since client interface implementations extend the server
* interface implementation corresponding to the same type.
*/
cg = new ClientInterfaceClassGenerator(
it,cl,pkgRoot,null,false);
cg = new ClientInterfaceClassGenerator(it,cl,pkgRoot,false);
jc.generateSourceCode(cg);
}
......
......@@ -31,7 +31,6 @@ import org.oasisopen.sca.ServiceReference;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.api.SourceCodeGeneratorItf;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.visit.BlockSourceCodeVisitor;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.ow2.frascati.tinfi.TinfiComponentOutInterface;
......@@ -47,10 +46,9 @@ public class ClientInterfaceClassGenerator
extends ServerInterfaceClassGenerator {
public ClientInterfaceClassGenerator(
InterfaceType it, Class<?> cl, String pkgRoot,
MembraneDesc<?> membraneDesc, boolean mergeable ) {
InterfaceType it, Class<?> cl, String pkgRoot, boolean mergeable ) {
super(it,cl,pkgRoot,membraneDesc,mergeable);
super(it,cl,pkgRoot,mergeable);
}
/**
......@@ -69,8 +67,7 @@ extends ServerInterfaceClassGenerator {
* server interface of the same type.
*/
SourceCodeGeneratorItf cg =
new ServerInterfaceClassGenerator(
it,proxycl,pkgRoot,membraneDesc,mergeable);
new ServerInterfaceClassGenerator(it,proxycl,pkgRoot,mergeable);
String name = cg.getTargetTypeName();
/*
......
......@@ -25,7 +25,6 @@ package org.ow2.frascati.tinfi.opt.oo;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.util.List;
import org.oasisopen.sca.annotation.Callback;
import org.objectweb.fractal.api.type.InterfaceType;
......@@ -35,8 +34,6 @@ 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.ControllerDesc;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;
import org.objectweb.fractal.juliac.proxy.ProxyClassGeneratorItf;
......@@ -100,8 +97,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
* Return the source code generator for component interfaces.
*/
@Override
public ProxyClassGeneratorItf getInterfaceClassGenerator(
InterfaceType it, MembraneDesc<List<ControllerDesc>> membraneDesc ) {
public ProxyClassGeneratorItf getInterfaceClassGenerator(InterfaceType it) {
final String signature = it.getFcItfSignature();
final Class<?> cl = jc.loadClass(signature);
......@@ -117,8 +113,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
if( itname.endsWith("-controller") || itname.equals("component") ) {
pcg =
new InterfaceImplementationClassGenerator(
it,cl,pkgRoot,membraneDesc,false);
new InterfaceImplementationClassGenerator(it,cl,pkgRoot,false);
}
else {
if( it.isFcClientItf() ) {
......@@ -132,13 +127,11 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
* which corresponds to the real implementation.
*/
pcg =
new ClientInterfaceClassGenerator(
it,cl,pkgRoot,membraneDesc,false);
new ClientInterfaceClassGenerator(it,cl,pkgRoot,false);
}
else {
pcg =
new ServerInterfaceClassGenerator(
it,cl,pkgRoot,membraneDesc,false);
new ServerInterfaceClassGenerator(it,cl,pkgRoot,false);
}
}
......@@ -170,8 +163,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
* for Julia control interfaces.
*/
SourceCodeGeneratorItf cg =
new InterfaceImplementationClassGenerator(
it,cl,pkgRoot,null,false);
new InterfaceImplementationClassGenerator(it,cl,pkgRoot,false);
jc.generateSourceCode(cg);
}
else {
......@@ -182,7 +174,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
// Server (input) interface implementation
SourceCodeGeneratorItf cg =
new ServerInterfaceClassGenerator(it,cl,pkgRoot,null,false);
new ServerInterfaceClassGenerator(it,cl,pkgRoot,false);
jc.generateSourceCode(cg);
if( it.isFcClientItf() ) {
......@@ -192,8 +184,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
* since client interface implementations extend the server
* interface implementation corresponding to the same type.
*/
cg = new ClientInterfaceClassGenerator(
it,cl,pkgRoot,null,false);
cg = new ClientInterfaceClassGenerator(it,cl,pkgRoot,false);
jc.generateSourceCode(cg);
}
......
......@@ -26,7 +26,6 @@ package org.ow2.frascati.tinfi.opt.oo;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.juliac.commons.lang.ClassHelper;
import org.objectweb.fractal.juliac.desc.MembraneDesc;
import org.objectweb.fractal.juliac.proxy.InterfaceImplementationClassGenerator;
import org.objectweb.fractal.juliac.visit.ClassSourceCodeVisitor;
import org.ow2.frascati.tinfi.TinfiComponentInterface;
......@@ -43,10 +42,9 @@ public class ServerInterfaceClassGenerator
extends InterfaceImplementationClassGenerator {
public ServerInterfaceClassGenerator(
InterfaceType it, Class<?> cl, String pkgRoot,
MembraneDesc<?> membraneDesc, boolean mergeable ) {
InterfaceType it, Class<?> cl, String pkgRoot, boolean mergeable ) {
super(it,cl,pkgRoot,membraneDesc,mergeable);
super(it,cl,pkgRoot,mergeable);
}
/**
......
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