import java.util.*; public privileged aspect TestAspect { pointcut p(Test t): target(t) && get(!public Set *Set) && !within(TestAspect); Set around(Test t):p(t) { Set s = proceed(t); return s; } public static void main(String []argv) { Set si = new Test1().foo(); Set sd = new Test2().foo(); } }