Hello there,

I've got a little problem, I haven't been able to solve.

What I'd like to have:
Advise executions of methods, which have at least one parameter with a
specific annotation (say @NN).

  public void arbitrary (Object param1, Object param2, @NN String param3,
Object Param4, ...)

(Consider param3 is a String and point1() will apply)

        public pointcut point1() : execution(* *.* (..,String,..));
        
        public pointcut point2() : execution(* *(..,@NN (String),*,*));
        
        public pointcut point3() : execution(* *(*,*,@NN (String),*,*));
        
        public pointcut point4() : execution(* *(Object,Object,@NN
(String),Object,Object));

Now the interesting part here is the pointcut "point1()", which applies to
"arbitrary(...)".
Even point2() applies.

However the following does not:

       public pointcut point5 () :execution(* *(..,@NN (String),..));

Do I make a mistake by assuming this should work, or do I misunderstand
something ?

---------

If this can be solved, and you are not tired of one more question:

Would there be any way to additionally expose such a parameter ? (
args(..,param,..) is not allowed )


Thank you for reading (and considering to answer :) )
-- 
View this message in context: 
http://www.nabble.com/Capture-one-annotated-parameter-amongst-many-tp26021577p26021577.html
Sent from the AspectJ - users mailing list archive at Nabble.com.

_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to