Commit a7318f66 authored by Lionel Seinturier's avatar Lionel Seinturier

--no commit message

--no commit message
parent fc3e70bc
......@@ -124,10 +124,13 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* for choosing interface source code generator.
*/
if( itname.endsWith("-controller") || itname.equals("component") ) {
String signature = it.getFcItfSignature();
Class<?> cl = jc.loadClass(signature);
if( itname.endsWith("-controller") || itname.equals("component") ) {
pcg =
new InterfaceImplementationClassGenerator(
jc,it, membraneDesc, false );
jc,it, cl, membraneDesc, false );
}
else {
if( it.isFcClientItf() ) {
......@@ -141,11 +144,13 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* which corresponds to the real implementation.
*/
pcg =
new ClientInterfaceClassGenerator(jc,it,membraneDesc,false);
new ClientInterfaceClassGenerator(
jc,it,cl,membraneDesc,false);
}
else {
pcg =
new ServerInterfaceClassGenerator(jc,it,membraneDesc,false);
new ServerInterfaceClassGenerator(
jc,it,cl,membraneDesc,false);
}
}
......@@ -160,7 +165,10 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
protected void generateInterfaceImpl( InterfaceType it, String ctrlDesc )
throws IOException {
String itname = it.getFcItfName();
String signature = it.getFcItfSignature();
Class<?> cl = jc.loadClass(signature);
String itname = it.getFcItfName();
if( itname.endsWith("-controller") || itname.equals("component") ) {
/*
......@@ -173,7 +181,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
* for Julia control interfaces.
*/
SourceCodeGeneratorItf cg =
new InterfaceImplementationClassGenerator(jc,it,null,false);
new InterfaceImplementationClassGenerator(jc,it,cl,null,false);
jc.generateSourceCode(cg);
}
else {
......@@ -184,7 +192,7 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
// Server (input) interface implementation
SourceCodeGeneratorItf cg =
new ServerInterfaceClassGenerator(jc,it,null,false);
new ServerInterfaceClassGenerator(jc,it,cl,null,false);
jc.generateSourceCode(cg);
if( it.isFcClientItf() ) {
......@@ -194,17 +202,15 @@ 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(jc,it,null,false);
cg = new ClientInterfaceClassGenerator(jc,it,cl,null,false);
jc.generateSourceCode(cg);
}
// ServiceReference implementation
cg = new ServiceReferenceClassGenerator(jc,it,null,false);
cg = new ServiceReferenceClassGenerator(jc,it,cl,null,false);
jc.generateSourceCode(cg);
// ServiceReference and input interface implementations for callbacks
String signature = it.getFcItfSignature();
Class<?> cl = jc.loadClass(signature);
Annotation annot =
ClassHelper.getAnnotation(
cl,
......@@ -215,10 +221,10 @@ extends org.objectweb.fractal.juliac.opt.comp.FCCompCtrlSourceCodeGenerator {
InterfaceType cbit =
new BasicInterfaceType(
"callback", cbcl.getName(), false, false, false );
cg = new ServiceReferenceClassGenerator(jc,cbit,null,false);
cg = new ServiceReferenceClassGenerator(jc,cbit,cbcl,null,false);
jc.generateSourceCode(cg);
cg = new CallBackInterfaceClassGenerator(jc,cbit,null,false);
cg = new CallBackInterfaceClassGenerator(jc,cbit,cbcl,null,false);
jc.generateSourceCode(cg);
}
}
......
......@@ -49,10 +49,10 @@ extends AbstractProxyClassGenerator {
public CallBackInterfaceClassGenerator() {}
public CallBackInterfaceClassGenerator(
Juliac jc,
InterfaceType it, MembraneDesc<?> membraneDesc, boolean mergeable ) {
Juliac jc, InterfaceType it, Class<?> cl, MembraneDesc<?> membraneDesc,
boolean mergeable ) {
super(jc,it,membraneDesc,mergeable);
super(jc,it,cl,membraneDesc,mergeable);
}
/**
......
......@@ -48,10 +48,10 @@ public class ClientInterfaceClassGenerator
extends ServerInterfaceClassGenerator {
public ClientInterfaceClassGenerator(
Juliac jc,
InterfaceType it, MembraneDesc<?> membraneDesc, boolean mergeable ) {
Juliac jc, InterfaceType it, Class<?> cl, MembraneDesc<?> membraneDesc,
boolean mergeable ) {
super(jc,it,membraneDesc,mergeable);
super(jc,it,cl,membraneDesc,mergeable);
}
/**
......@@ -70,7 +70,8 @@ extends ServerInterfaceClassGenerator {
* server interface of the same type.
*/
SourceCodeGeneratorItf cg =
new ServerInterfaceClassGenerator(jc,it,membraneDesc,mergeable);
new ServerInterfaceClassGenerator(
jc,it,proxycl,membraneDesc,mergeable);
String name = cg.getTargetTypeName();
/*
......@@ -114,7 +115,8 @@ extends ServerInterfaceClassGenerator {
ServiceReference.class.getName()+'<'+it.getFcItfSignature()+'>',
"getServiceReference", null, null );
SourceCodeGeneratorItf cg =
new ServiceReferenceClassGenerator(jc,it,membraneDesc,mergeable);
new ServiceReferenceClassGenerator(
jc,it,this.proxycl,membraneDesc,mergeable);
String srclname = cg.getTargetTypeName();
mv.visit (" return new ");
mv.visit (srclname);
......
......@@ -101,7 +101,10 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
public ProxyClassGeneratorItf getInterfaceClassGenerator(
InterfaceType it, MembraneDesc<?> membraneDesc ) {
ProxyClassGeneratorItf pcg = null;
String signature = it.getFcItfSignature();
Class<?> cl = jc.loadClass(signature);
ProxyClassGeneratorItf pcg = null;
String itname = it.getFcItfName();
/*
......@@ -112,7 +115,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
if( itname.endsWith("-controller") || itname.equals("component") ) {
pcg =
new InterfaceImplementationClassGenerator(
jc,it,membraneDesc,false);
jc,it,cl,membraneDesc,false);
}
else {
if( it.isFcClientItf() ) {
......@@ -126,11 +129,13 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
* which corresponds to the real implementation.
*/
pcg =
new ClientInterfaceClassGenerator(jc,it,membraneDesc,false);
new ClientInterfaceClassGenerator(
jc,it,cl,membraneDesc,false);
}
else {
pcg =
new ServerInterfaceClassGenerator(jc,it,membraneDesc,false);
new ServerInterfaceClassGenerator(
jc,it,cl,membraneDesc,false);
}
}
......@@ -144,7 +149,10 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
@Override
protected void generateInterfaceImpl( InterfaceType it, String ctrlDesc )
throws IOException {
String signature = it.getFcItfSignature();
Class<?> cl = jc.loadClass(signature);
String itname = it.getFcItfName();
if( itname.endsWith("-controller") || itname.equals("component") ) {
......@@ -158,7 +166,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
* for Julia control interfaces.
*/
SourceCodeGeneratorItf cg =
new InterfaceImplementationClassGenerator(jc,it,null,false);
new InterfaceImplementationClassGenerator(jc,it,cl,null,false);
jc.generateSourceCode(cg);
}
else {
......@@ -169,7 +177,7 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
// Server (input) interface implementation
SourceCodeGeneratorItf cg =
new ServerInterfaceClassGenerator(jc,it,null,false);
new ServerInterfaceClassGenerator(jc,it,cl,null,false);
jc.generateSourceCode(cg);
if( it.isFcClientItf() ) {
......@@ -179,17 +187,15 @@ 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(jc,it,null,false);
cg = new ClientInterfaceClassGenerator(jc,it,cl,null,false);
jc.generateSourceCode(cg);
}
// ServiceReference implementation
cg = new ServiceReferenceClassGenerator(jc,it,null,false);
cg = new ServiceReferenceClassGenerator(jc,it,cl,null,false);
jc.generateSourceCode(cg);
// ServiceReference and input interface implementations for callbacks
String signature = it.getFcItfSignature();
Class<?> cl = jc.loadClass(signature);
Annotation annot =
ClassHelper.getAnnotation(
cl,
......@@ -201,10 +207,10 @@ extends org.objectweb.fractal.juliac.opt.oo.FCOOCtrlSourceCodeGenerator {
InterfaceType cbit =
new BasicInterfaceType(
"callback", cbcl.getName(), false, false, false );
cg = new ServiceReferenceClassGenerator(jc,cbit,null,false);
cg = new ServiceReferenceClassGenerator(jc,cbit,cbcl,null,false);
jc.generateSourceCode(cg);
cg = new CallBackInterfaceClassGenerator(jc,cbit,null,false);
cg = new CallBackInterfaceClassGenerator(jc,cbit,cbcl,null,false);
jc.generateSourceCode(cg);
}
}
......
......@@ -50,10 +50,10 @@ extends AbstractInterceptorSourceCodeGenerator {
}
public SCAContentInterceptorSourceCodeGenerator(
Juliac jc,
InterfaceType it, MembraneDesc<?> membraneDesc, boolean mergeable ) {
Juliac jc, InterfaceType it, Class<?> cl, MembraneDesc<?> membraneDesc,
boolean mergeable ) {
super(jc,it,membraneDesc,mergeable);
super(jc,it,cl,membraneDesc,mergeable);
}
/**
......
......@@ -58,10 +58,10 @@ extends AbstractInterceptorSourceCodeGenerator {
}
public SCAIntentInterceptorSourceCodeGenerator(
Juliac jc,
InterfaceType it, MembraneDesc<?> membraneDesc, boolean mergeable ) {
Juliac jc, InterfaceType it, Class<?> cl, MembraneDesc<?> membraneDesc,
boolean mergeable ) {
super(jc,it,membraneDesc,mergeable);
super(jc,it,cl,membraneDesc,mergeable);
}
/**
......
......@@ -46,10 +46,10 @@ extends AbstractInterceptorSourceCodeGenerator {
}
public SCATinfiInterceptorSourceCodeGenerator(
Juliac jc,
InterfaceType it, MembraneDesc<?> membraneDesc, boolean mergeable ) {
Juliac jc, InterfaceType it, Class<?> cl, MembraneDesc<?> membraneDesc,
boolean mergeable ) {
super(jc,it,membraneDesc,mergeable);
super(jc,it,cl,membraneDesc,mergeable);
}
/**
......
......@@ -44,10 +44,10 @@ public class ServerInterfaceClassGenerator
extends InterfaceImplementationClassGenerator {
public ServerInterfaceClassGenerator(
Juliac jc,
InterfaceType it, MembraneDesc<?> membraneDesc, boolean mergeable ) {
Juliac jc, InterfaceType it, Class<?> cl, MembraneDesc<?> membraneDesc,
boolean mergeable ) {
super(jc,it,membraneDesc,mergeable);
super(jc,it,cl,membraneDesc,mergeable);
}
/**
......
......@@ -62,10 +62,10 @@ extends AbstractProxyClassGenerator {
public ServiceReferenceClassGenerator() {}
public ServiceReferenceClassGenerator(
Juliac jc,
InterfaceType it, MembraneDesc<?> membraneDesc, boolean mergeable ) {
Juliac jc, InterfaceType it, Class<?> cl, MembraneDesc<?> membraneDesc,
boolean mergeable ) {
super(jc,it,membraneDesc,mergeable);
super(jc,it,cl,membraneDesc,mergeable);
}
/**
......@@ -232,10 +232,13 @@ extends AbstractProxyClassGenerator {
new BasicInterfaceType(
"callback",callbackClass.getName(),false,false,false);
SourceCodeGeneratorItf cg =
new CallBackInterfaceClassGenerator(jc,cbit,null,mergeable);
new CallBackInterfaceClassGenerator(
jc,cbit,callbackClass,null,mergeable);
String cbitfclname = cg.getTargetTypeName();
cg = new ServiceReferenceClassGenerator(jc,cbit,null,mergeable);
cg =
new ServiceReferenceClassGenerator(
jc,cbit,callbackClass,null,mergeable);
String cbcrclname = cg.getTargetTypeName();
mv.visit (" "+ComponentInterface.class.getName()+" ci = (");
......
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