blob: acc77d40286c6d0161fb2e827c7b30840099e09e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import org.aspectj.testing.*;
public class Orleans {
static boolean called = false;
public static void main(String[] args) {
String hello[] = new String[] { "h", "e", "l", "l", "o" };
Object o = new Object();
o = new Orleans(true);
Tester.check(called, "Advice was not called.");
}
public Orleans(boolean b) {}
}
aspect ResourceAccounting issingleton() {
pointcut constructions(): call(new(..));
before(): constructions() {
Orleans.called = true;
}
}
|