Announcement Announcement Module
Collapse
No announcement yet.
Pointcut for all method invocations except from one class/interface Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 04:17 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 .

    Comment


    • #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.

      Comment

      Working...
      X