Off the top of my head (not compiled and probably not the best way!), this pointcut should work:
call(void A.a()) && withincode(void B.a())
For the more general case, where you only know about "A" and you want to handle any subclass:
call(void A.a()) && withincode(void A+.a())
Not perfect; it would match on A.a if it's a recursive function. So,
call(void A.a()) && withincode(void A+.a()) && ! withincode(void A.a())
dean On Mar 25, 2009, at 9:52 AM, Alejandro Garcia wrote: Hello,
I need to capture a super method call, any idea how or if it is possible? Example:
class A { void a(){} }
class B extends A {void a(){super.a();}}
Thank you for any help, _______________________________________________ aspectj-users mailing list aspectj-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/aspectj-users
Dean Wampler, Ph.D. co-author: "Programming Scala", O'Reilly
twitter: @deanwampler, @chicagoscala See also:
I want my tombstone to say: Unknown Application Error in Dean Wampler.exe. Application Terminated. [Okay] [Cancel]
|