Hi,
I am trying to write an extension that allows me to add parameters in
aspects.
for example:
----------------------------------------------------------
public aspect SynchAspect(Method [] methods) {
//lock declaration
before(): exection (methods){
synchronized(this){
>> synchronization logic
>> aquiring the lock
}
}//end before
after(): execution (methods){
synchronized(this){
>> 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?
regards,
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