1234567891011121314151617181920212223242526272829303132333435 |
- package test;
- public class VerifyErrorOnSet {
-
- class Node {
- int value;
-
- Node(int v)
- {
- value = v;
- }
- }
-
-
- public VerifyErrorOnSet()
- {
- new Node(1);
- }
-
- public static void main(String[] args) {
- VerifyErrorOnSet l = new VerifyErrorOnSet();
- }
-
- }
-
-
- aspect ListAspect {
-
- pointcut setField(Object t) : target(t) && set(* VerifyErrorOnSet.Node+.*);
-
- before(Object t) : setField(t) {
- System.out.println("WRITE");
- // Do something with t...
- }
-
- }
|