blob: fae646ba0bd69ebcaced50108b8f55e11bf03079 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
public class A {
static Object s;
public static void main(String[] args) {
String t = "Hello, World!";
t.toString();
if (s != t) throw new Error();
}
static abstract aspect GenericAspect<T> {
abstract pointcut checkpoint(T t);
// advice declaration causes error
after(T t): checkpoint(t) { s = t;}
}
static aspect AAA extends GenericAspect<String>{
pointcut checkpoint(String s) : target(s) &&
call(String String.toString());
}
}
|