This content has been marked as final.
Show 3 replies
-
1. Re: Is it possible to intercept method in Abstract Class
kabirkhan Feb 5, 2010 7:38 AM (in response to nizzy)We weave the point where the method is actually implemented by replacing the method body, so try
<bind pointcut="execution(protected * $instanceof{xxx.xxx.AbstractHandler}->aquireHandler(..)})"> <interceptor-ref name="mockhandler"/> </bind>
This is assuming that aquireHandler is an abstract method -
2. Re: Is it possible to intercept method in Abstract Class
nizzy Feb 5, 2010 8:32 AM (in response to kabirkhan)Hi Kabir,
The class is abstract but the method is common to all sub-classes and so is implemented in abstract class.
-
3. Re: Is it possible to intercept method in Abstract Class
nizzy Feb 5, 2010 9:11 AM (in response to nizzy)Thanks again for the help I can now intercept using pointcut;
<bind pointcut="execution(protected * $instanceof{*.AbstractHandler}->aquireHandler(..))"> <interceptor-ref name="mockhandler"/> </bind>
Which is pretty much exactly as you suggested Kabir, cheers.