blob: 03c88f80d729b4387e800961fe95900c82533a0c (
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
|
import org.aspectj.lang.annotation.*;
public class Basic2b {
public static void main(String []argv) {
Basic2b b = new Basic2b();
if (!(b instanceof X.I)) throw new RuntimeException("Basic2b should implement I");
}
}
@Aspect class X {
interface I {
}
static class IImpl implements I {
public void m2() { }
}
@DeclareParents(value="Basic2b",defaultImpl=X.IImpl.class)
private I simplefield;;
@Before("execution(* *(..))")
public void advice1() {}
}
|