Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] how to refer to pointcut defined in other aspects which extend the same parent aspect?

Dear all,

  i want to refer to pointcut defined in other aspects (say AspectA,
AspectB) which extend the same parent aspect (say ParentAspect), without
prior knowning the existence of AspectA and AspectB?

public abstract aspect ParentAspect {
   public abstract pointcut monitorPoint();
}

public aspect AspectA extends ParentAspect {
   public pointcut monitorPoint(): execution(* *..*.main(..));
}

public aspect AspectB extends ParentAspect {
   public pointcut monitorPoint(): execution(* *..*.sayHello(..));
}

i want to write an advice to match the "ParentAspect+.monitorPoint()" 

public aspect InterceptAspect{

  //this advice don't compile, with error message: Syntax error on token
".", "name pattern" expected
  void around(): ParentAspect+.monitorPoint(){
      //do something
      proceed();
  }

}


could anybody tell me how to archieve my goal?

thank you

ppk


-- 
View this message in context: http://www.nabble.com/how-to-refer-to-pointcut-defined-in-other-aspects-which-extend-the-same-parent-aspect--tp24981874p24981874.html
Sent from the AspectJ - users mailing list archive at Nabble.com.



Back to the top