Results 1 to 3 of 3

Thread: Pointcut for all method invocations except from one class/interface

  1. #1
    Join Date
    Oct 2011
    Posts
    4

    Default 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.

  2. #2
    Join Date
    Oct 2011
    Posts
    4

    Default

    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 .

  3. #3
    Join Date
    Dec 2011
    Posts
    3

    Thumbs up

    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
  •