-
Dec 11th, 2011, 03:41 PM
#1
Pointcut for all method invocations except from one class/interface
Hello,
I need to write pointcut expression, which catch all method calls except calls from one specific class/interface.
Someting like:
@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
#2
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
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules