Is it possible to write a pointcut to intercept execution of some method which has some of
its arguments annotated with certain annotation. For example method declared as follows:
void someMethod(@SomeAnnotation String arg1) {...}
It would be nice if pointcut like this would be possible:
execution(* *->*(@SomeAnnotation *))
or even better:
execution(* *->*(.., @SomeAnnotation *, ..)) - it would mean, that pointcut should
match execution of any method with any of its arguments being annotated with
@SomeAnnotation.
If such pointcut worked it would be trivial to implement an aspect checking not null
conditions on method arguments:
void exampleMethod(String nullable, @NotNull String notNullable) {...}
Regards
Jarek
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220096#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...