blob: a37f027c3b1cecba03a66db1c99c0b11ed4101d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
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...
}
}
|