Access to annotation in @Around?
Is it possible to get access to the annotation used in an @Around pointcut? I would have expected this to work:
@Around("@annotation("myAnnotation")
public Object doSomething( ProceedingJoinPoint pjp, MyAnnotation myAnnotation ) { }
I have used the @annotation(annotationname) syntax to access the annotation in other contexts. But when used in an @Around pointcut the ProceedingJoinPoint arg seems to break this. I have read the documentation and tried variations on argNames() and attempting to declare the joinpoint in the pointcut, but none of this works.
Can someone tell me how to do the above?
thanks,
Pat Niemeyer