Commit 9f3630e3 authored by Lionel Seinturier's avatar Lionel Seinturier

Let the interceptor delegate to the control interface, not the interface of the control component.

parent 11b95b13
......@@ -64,21 +64,18 @@ extends org.objectweb.fractal.juliac.opt.comp.InitializerCompCtrlClassGenerator
}
@Override
public boolean generateInterceptorCreation(
protected void generateInterceptorPostInit(
BlockSourceCodeVisitor mv, InterfaceType it, String delegate ) {
boolean b = super.generateInterceptorCreation(mv,it,delegate);
if(b) {
String name = it.getFcItfName();
mv.visit (" ((");
mv.visit (TinfiComponentInterceptor.class.getName());
mv.visit ("<?>)intercept).setFcItf((");
mv.visit (Interface.class.getName());
mv.visit (")");
mv.visit (delegate);
mv.visitln(");");
}
return b;
super.generateInterceptorPostInit(mv,it,delegate);
mv.visit (" ((");
mv.visit (TinfiComponentInterceptor.class.getName());
mv.visit ("<?>)intercept).setFcItf((");
mv.visit (Interface.class.getName());
mv.visit (")");
mv.visit (delegate);
mv.visitln(");");
}
@Override
......
......@@ -367,7 +367,7 @@ public class SCAIntentControllerTestCase {
IntentJoinPoint ijp = countItf.getLastIntentJoinPoint();
Interface itf = ijp.getInterface();
String name = itf.getFcItfName();
Assert.assertEquals("//component",name);
Assert.assertEquals("component",name);
}
/**
......@@ -396,7 +396,7 @@ public class SCAIntentControllerTestCase {
IntentJoinPoint ijp = countItf.getLastIntentJoinPoint();
Interface itf = ijp.getInterface();
String name = itf.getFcItfName();
Assert.assertEquals("//binding-controller",name);
Assert.assertEquals("binding-controller",name);
}
/**
......
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