[jboss-user] [JBoss AOP] - Re: help with poincut for annotation parameter values
do-not-reply at jboss.com
Fri Dec 19 06:05:20 EST 2008
As far as I know you can only set pointcuts for an annotation, but not for its attributes. So you have to intercept all @Mixins annotations and then you can check out which attributes are set in your aspect/interceptor:
| MethodInvocation methodInvocation = (MethodInvocation) invocation;
| //get your annotation
| @Mixins mixinAnnotation = methodInvocation.getMethod().getAnnotation(ContainerSide.class);
| //get the value attribute
| class someClasses = mixinAnnotation.value();
This was just a quick example and might not work like that, but it shows the way to do it.
Maybe this example helps somehow.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4197584#4197584
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4197584
More information about the jboss-user