Mail Archive Home | fractal-commits List | October 2006 Index
| <-- Date Index --> | <-- Thread Index --> |
Date: Monday, October 30, 2006 @ 18:37:04
Author: seintur
Path: /cvsroot/fractal/julia/src/org/objectweb/fractal/juliak
Modified: asm/LifeCycleInterceptorClassGenerator.java
control/lifecycle/AbstractLifeCycleInterceptor.java
ASM generated lifecycle interceptors: store only once the reference towards
the lifecycle controller.
-----------------------------------------------------+
asm/LifeCycleInterceptorClassGenerator.java | 15 ++++++-----
control/lifecycle/AbstractLifeCycleInterceptor.java | 23 ++++++++++++------
2 files changed, 24 insertions(+), 14 deletions(-)
Index:
julia/src/org/objectweb/fractal/juliak/asm/LifeCycleInterceptorClassGenerator.java
diff -u
julia/src/org/objectweb/fractal/juliak/asm/LifeCycleInterceptorClassGenerator.java:1.2
julia/src/org/objectweb/fractal/juliak/asm/LifeCycleInterceptorClassGenerator.java:1.3
---
julia/src/org/objectweb/fractal/juliak/asm/LifeCycleInterceptorClassGenerator.java:1.2
Mon Oct 30 15:15:09 2006
+++
julia/src/org/objectweb/fractal/juliak/asm/LifeCycleInterceptorClassGenerator.java
Mon Oct 30 18:37:04 2006
@@ -233,19 +233,20 @@
null,
new
String[]{InstantiationException.class.getName().replace('.','/')});
- // super.initFcController(ic)
+ // Object lcContent = super.getFcLifeCycleController(ic)
+ mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitVarInsn(Opcodes.ALOAD, 1);
mv.visitMethodInsn(
- Opcodes.INVOKESPECIAL, alciSignature,
- "initFcController", "(L"+icSignature+";)V");
+ Opcodes.INVOKEVIRTUAL, targetSignature,
+ "getFcLifeCycleController",
+ "(L"+icSignature+";)Ljava/lang/Object;" );
// lc = (LifeCycleControllerImpl) lcContent
- mv.visitVarInsn(Opcodes.ALOAD, 0);
- mv.visitVarInsn(Opcodes.ALOAD, 0);
- mv.visitFieldInsn(Opcodes.GETFIELD, targetSignature, "lcContent",
"Ljava/lang/Object;");
mv.visitTypeInsn(Opcodes.CHECKCAST, getLcCtrlImplSignature());
- mv.visitFieldInsn(Opcodes.PUTFIELD, targetSignature, "lc",
"L"+getLcCtrlImplSignature()+";");
+ mv.visitFieldInsn(
+ Opcodes.PUTFIELD, targetSignature,
+ "lc", "L"+getLcCtrlImplSignature()+";");
mv.visitInsn(Opcodes.RETURN);
mv.visitMaxs(2, 2);
Index:
julia/src/org/objectweb/fractal/juliak/control/lifecycle/AbstractLifeCycleInterceptor.java
diff -u
julia/src/org/objectweb/fractal/juliak/control/lifecycle/AbstractLifeCycleInterceptor.java:1.2
julia/src/org/objectweb/fractal/juliak/control/lifecycle/AbstractLifeCycleInterceptor.java:1.3
---
julia/src/org/objectweb/fractal/juliak/control/lifecycle/AbstractLifeCycleInterceptor.java:1.2
Mon Oct 30 15:15:10 2006
+++
julia/src/org/objectweb/fractal/juliak/control/lifecycle/AbstractLifeCycleInterceptor.java
Mon Oct 30 18:37:04 2006
@@ -46,20 +46,21 @@
public abstract class AbstractLifeCycleInterceptor implements Interceptor {
/**
- * Initialize this controller object.
+ * Return the content associated to the lifecycle control component.
*
* @param ic
* information about the component to which this controller object
* belongs.
- * @throws InstantiationException if the initialization fails.
+ * @throws InstantiationException if the retieval fails.
*/
- public void initFcController(InitializationContext ic)
+ public Object getFcLifeCycleController(InitializationContext ic)
throws InstantiationException {
/*
* Retrieve the lifecycle-controller interface.
*/
Component compctrl = (Component) ic.getInterface("component");
+ Object lcContent;
try {
lcContent = compctrl.getFcInterface(LifeCycleControllerDef.NAME);
}
@@ -76,15 +77,24 @@
ComponentInterface lcItf = (ComponentInterface) lcContent;
lcContent = lcItf.getFcItfImpl();
}
+
+ return lcContent;
}
- protected Object lcContent;
-
+ /**
+ * Initialize this controller object.
+ *
+ * @param ic information about the component to which this controller
object
+ * belongs.
+ * @throws InstantiationException if the initialization fails.
+ */
+ public abstract void initFcController (InitializationContext ic)
+ throws InstantiationException;
+
/**
* Returns the object to which this interceptor delegates method calls.
*
* @return the object to which this interceptor delegates method calls.
- * @see #setFcItfDelegate setFcItfDelegate
*/
public abstract Object getFcItfDelegate ();
@@ -93,7 +103,6 @@
*
* @param delegate the object to which this interceptor delegates method
* calls.
- * @see #getFcItfDelegate getFcItfDelegate
*/
public abstract void setFcItfDelegate (Object delegate);
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.