1
Vote

Gripper Loom works only over virtuals

description

Hello!
I tried static weaving but it is only working over virtual methods and properties. I understood that static weaving works for not virtual methods or properties.

thank you

comments

wschult wrote Feb 3, 2013 at 10:12 PM

Static weaving does not mean, that you can interweave static methods. It depicts the weaving strategy. In contrast to dynamic weaving the weaving process is done before you run your application. You can’t change it afterwards. The benefit of static weaving is, that you have almost no runtime overhead.

wrote Feb 3, 2013 at 10:14 PM

ramyhhh wrote Feb 4, 2013 at 8:30 AM

Sorry but I wasn't clear. The problem is that I need to mark my methods with "virtual" in order to be weaved and as you know virtual method calls considered heavy weight operation.
I understand that dynamic weaving (proxy) needs virtual methods to override them but static weaving does not it rewriting the PE itself so why only virtuals.

wschult wrote Feb 4, 2013 at 8:31 AM

Static weaving does not mean, that you can interweave static methods. It depicts the weaving strategy. In contrast to dynamic weaving the weaving process is done before you run your application. You can’t change it afterwards. The benefit of static weaving is, that you have almost no runtime overhead.

** Closed by wschult 03/02/2013 14:14

ramyhhh wrote Feb 4, 2013 at 8:31 AM

wschult wrote Feb 4, 2013 at 10:11 AM

as you know virtual method calls considered heavy weight operation.
Nowadays the gap between a static method call and a virtual method call is not really measurable and should not play any role within a design consideration. More important is, that the intention of a virtual method is that you could "modify" its behaviour, where the intention of a static method is exactly the opposite. That's the reason why LOOM only supports interweaving of virtual and interface methods.

wrote Feb 14, 2013 at 7:16 PM