Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

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. }