Define pointcut to capture an interface but not parent or sub interfaces

Posted by mR_fr0g on Stack Overflow See other posts from Stack Overflow or by mR_fr0g
Published on 2010-05-18T17:10:57Z Indexed on 2010/05/18 17:40 UTC
Read the original article Hit count: 109

Filed under:
|
|
|

I was wondering how to define a pointcut in aspecJ the captures any method of an interface but not the methods of any parent or sub interface.

pubic interface A {
  void methodA();
}
pubic interface B extends A {
  void methodB();
}
pubic interface C extends B {
  void methodC();
}

I would like a poincut that only catches methodB() and not methodA() or methodC(). Is there any way i can do this in a general way without listing all the sub and super interfaces in the pointcut?

© Stack Overflow or respective owner

Related posts about java

Related posts about aspectj