Dec 11th, 2011, 03:41 PM
Pointcut for all method invocations except from one class/interface
I need to write pointcut expression, which catch all method calls except calls from one specific class/interface.
@Pointcut( execution(* foo.bar.update*(..) ) && !doNotAcceptMethodCallsFrom( foo.bar.evilClass* ) )
I'm using latest spring with AOP support and LTW.
I'm not sure if is this possible, but thank you for any advice.
Last edited by tygl; Dec 11th, 2011 at 04:17 PM.
Dec 11th, 2011, 04:15 PM
Erm, just need to clarify why I have this problem. I have problem with aspect recursion which I described on stack owerflow: http://stackoverflow.com/questions/8...loop-execution
Maybe is there another way, but I'm so new in AOP and I can not see it, for now atleast .
Dec 13th, 2011, 01:38 AM
can u tell the class structure for the bar class and evilclass ,based on your question the pointcut will be any method starting with update*... in the bar object is your joint point ,so it will not select the evilclass .I think you need not use the second expression to do that.
Can u redefine the question in some way we can find the solution.
Expecting the relationship between bar and evilclasses.