[abc-users] Parameters for aspects

From: Khalid Al-Jasser <k.al-jasser_at_pgrad.unimelb.edu.au>
Date: Fri, 14 Sep 2007 10:09:33 +1000


I am trying to write an extension that allows me to add parameters in
for example:

public aspect SynchAspect(Method [] methods) {

    //lock declaration

    before(): exection (methods){
>> synchronization logic
>> aquiring the lock
    }//end before

    after(): execution (methods){
>> synchronization logic
>> releasing the lock
    }//end after
in the example above, instead of hardcoding the pointcut that includes the
methods, I
would like to supply these methods as parameters to the aspect.
After that, in the before and after advice, I need to "literally" replace
the $methods$ with the actual passed methods.
In other words, I need to manipulate the aspect code before compiling it.

I am currently stuck as I don't know any way to manipulate the signature of
the execution pointcut.
Any ideas!! can you help please?
Khalid Aljasser
The University of Melbourne
Received on Fri Sep 14 2007 - 01:11:09 BST

This archive was generated by hypermail 2.2.0 : Fri Sep 14 2007 - 02:00:11 BST