You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VerifyErrorOnSet.aj 652B

1234567891011121314151617181920212223242526272829303132333435
  1. package test;
  2. public class VerifyErrorOnSet {
  3. class Node {
  4. int value;
  5. Node(int v)
  6. {
  7. value = v;
  8. }
  9. }
  10. public VerifyErrorOnSet()
  11. {
  12. new Node(1);
  13. }
  14. public static void main(String[] args) {
  15. VerifyErrorOnSet l = new VerifyErrorOnSet();
  16. }
  17. }
  18. aspect ListAspect {
  19. pointcut setField(Object t) : target(t) && set(* VerifyErrorOnSet.Node+.*);
  20. before(Object t) : setField(t) {
  21. System.out.println("WRITE");
  22. // Do something with t...
  23. }
  24. }