[jboss-user] [JBoss AOP] - Re: Pointcut intercepting methods with annotated arguments

jarr do-not-reply at jboss.com
Fri Mar 27 15:23:12 EDT 2009


Thanks for reply.

Actually this test http://anonsvn.jboss.org/repos/jbossas/branches/Branch_AOP_1_5/aop/src/resources/test/annotatedparams/jboss-aop.xml is not for the case I was asking about.

In this test interceptor intercepts methods with with parameter that have an annotation on its type.

But I would like to intercept methods with annotation on method parameter itself. Something like this:

void someMethod(@NotNull String message) {
  | ...
  | }

Here annotation is not on the type of parameter, but on the parameter itself.
Such annotations are possible and are sometimes used, for example in Spring MVC 2.5 for mapping request parameters to method parameters:
http://static.springframework.org/spring/docs/2.5.x/reference/mvc.html#mvc-ann-requestparam

Regards
Jarek

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221667#4221667

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221667



More information about the jboss-user mailing list