Community
Participate
Working Groups
We should support marking certain context as private i.e. not exposed to advice or other pointcuts. See http://abc.comlab.ox.ac.uk/extensions for a syntax possibility. A couple of use cases: 1. Conditional pointcut pointcut largeWithdrawl() : private(balance) : execution(* Account.debit(float) && args(amount) && if(amount > LARGE_AMOUNT_THRESHOLD); 2. Computing the cache key Consider a design approach similar to that specified in #266381, where the base aspect doesn't dictate the use of annotation-based pointcut. I will like the pointcut to simply expose the computed key aspect AbstractCaching { public abstract pointcut cached(String key); after(String key) returning(Object cachedObject) : cached(key) { ... caching logic } } aspect AnnotationDrivenCaching extends AbstractCaching { pointcut cached(String key) : private(Cacheable cacheable) : execution(@Cacheable * *(..)) && @annotation(cacheable) && let(key = computeKey(cacheable.keyScript)); } 2. Transaction management Base aspect: public abstract pointcut transactional(TransactionAttribute ta); Annotation-based subaspect: pointcut transactional(TransactionAttribute ta) : private(Transactional tx) : execution(@Transactional * *(..)) && @annotation(tx) && let(ta, computeTa(tx)); Mapping based subaspect: pointcut transactional(TransactionAttribute ta) : execution(* ajia.service.*.*(..)) && let(ta, computeTa(thisJoinPoint)); It seems that this feature should be implemented along with the let() pointcut in #266381. Most use case I see seems to need both.