1 2 3 4 5 6 7 8 9 10 11 12 13
import java.io.InvalidClassException; import org.aspectj.testing.Tester; public privileged aspect PrivilegedAspect { pointcut run (Test test) : execution(public void run()) && this(test); before (Test test) : run (test) { System.out.println("? PrivilegedAspect.run() i=" + test.i); } }