[PRL] aspects to eliminate aspects

Therapon Skotiniotis skotthe at ccs.neu.edu
Wed May 18 12:42:32 EDT 2005


On Wed, May 18, 2005 at 12:12:52PM -0400, Pengcheng Wu wrote:
> 
> I bet you wanted the answers to both of the questions to be 'no'.
> 
> On Wed, 18 May 2005, Matthias Felleisen wrote:
> 
> > Question 1: Is it possible to write an aspect that monitors a class to
> > discover the intervention of _other_ aspects?
> 
> I think a dynamic checker is easy to implement. You can have something
> like:
> 
>   aspect CheckerAspect {
>     pointcut adviceinanotheraspects(): adviceexecution() && within(!CheckerAspect); //or you can always enumerate all
> other aspects
>     before(): adviceinanotheraspects() {
>        if(thisJoinPoint.getThis().getClass() is the class you want to check with)

 This will give you the "class" of the aspect not the one you want to 
 monitor. "thisJoinPoint" at an advicexecution pcd holds the Aspect not the 
 underlying class. Look at: 

 http://www.ccs.neu.edu/home/skotthe/pub/Code/

 


 
>           error("A undesired intervention detected!");
>     }
>   }
> 
> Basically, you capture all advice execution in aspects other than the
> CheckerAspect and if the method calls those advice are operating on are
> from the class you are checking with, then raise an error.
> 
> I am not sure how a static checker can be easily implemented. But I feel
> that with my language extension proposal called Statically Executable
> Advice (AOSD'2003), it won't be too hard either.
> 
> --Pengcheng
> 
> 
> 
> _______________________________________________
> PRL mailing list
> PRL at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/prl



More information about the PRL mailing list