What i'd like to do is when an aspect is invoked based on the pointcut being matched, perform several tasks, then if the aspect is being invoked because of a select few of these pointcuts being matched, perform an additional task.
Something like this
i've found the method AspectJExpressionPointcut.matches(Method, Class<?>) that seems to get close however it seems to falsely return true when the pointcut expression is a bean pointcut and this is testing a method and class that have nothing to do with it
public boolean matches(ProceedingJoinPoint joinPoint, Pointcut pointcut);
So, to rephrase my question, how can you tell which pointcut is the one that matched causing the current aspect to be invoked?
<aop:pointcut id="beanPointcut" expression="bean(someBean)"/>