Hello Dean,
Thank you very much for your response but I forgot to mention that what I really need is to capture super.*(..), translated to bytecode would be the line where we have "invokespecial #??; //Method X.x:()V" where I don't care who's X or x. This would be a generalization of any call site where we have a super.*(..); I apologize for previously not correctly explain myself.
Any other idea? Again thank you for your answer, actually it help me realize another issue. :)
On Mar 25, 2009, at 4:09 PM, Dean Wampler wrote: 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 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]
<ATT00001.txt>
|