Thanks for the responses - I didn't dig into it deep enough to realize that Java isn't supporting annotations on return types (I'm assuming that this is the issue….).
Just to be clear, and we are Java 7, there is no way to write/annotate a Java method annotating the return type and that even if there were, Aspectj doesn't support this.
I would say that perhaps the MethodPattern spec in the documentation is a little ambiguous, then, as it has TypePattern (for return value of method) and one of the patterns for this is AnnotationPattern.
Maybe a MethodReturnTypePattern would exclude the AnnotatedPattern from TypePattern?
Thanks for all the quick responses!
Jay
Hi Jay,
You actually have an annotated method there, not an annotated return value. So this will match:
@Around( "execution(@ImmutableCollection * *(..))")
*UNLESS* you are on Java8 and are exploiting type annotations?? If you are then I should say AspectJ does not yet support type annotations.
cheers, Andy
_______________________________________________ aspectj-users mailing list aspectj-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/aspectj-users
|