public class Pair { public Pair(F first, S second) { } } aspect IdempotentCache pertarget(cached()) { pointcut cached(): execution(public * *(..)) && within(Pair); }