Results 1 to 2 of 2

Thread: How to create pointcut for binding @args parameters?

  1. #1

    Default How to create pointcut for binding @args parameters?

    Hi,

    I've read through the spring docs on pointcuts, but cannot seem to find the solution to my question. I'm looking to pointcut on methods that use annotated arguments, but am not sure how to structure the pointcut such that my args are accessible.

    For example:
    Code:
    public void myMethod( @myAnnotation String var1, @myAnnotation Boolean var2, Map var3, @myAnnotation Object var4 )
    I would like myAnnotation to be able to preface any type of object, and not bind the advice to a particular signature, but rather to any signature that contains the annotation. Furthermore, my advice needs access to the entire parameter list (not just the annotated parameters).

    I'm assuming this must be feasible in someway or another, but not sure how. If this is not feasible, is there a workaround that can be recommended?

    I assume that Spring must do something similar for its @Controller annotation (I was hoping to learn from how Spring implements the solution), but I cannot seem to find where Spring has placed its corresponding aspect.

    Thanks!

    Eric

  2. #2

    Default

    If you want to access adviced method parameters then use joinPoint or try this----http://blog.springsource.com/2007/03/29/aop-context-binding/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •