blob: 6233a7d152667b2aca6e320340e1062c2c1b5ae5 (
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
|
package p;
public class B {
public B() {
}
public static void main(String[] argv) {
B b = new B();
b.sayhi();
b.sayhi();
b.sayhi();
if (!a.X.hasAspect(A.class)) {
throw new RuntimeException("hasAspect(A.class) should return true");
}
if (!a.X.hasAspect(B.class)) {
throw new RuntimeException("hasAspect(B.class) should return true");
}
if (a.X.hasAspect(q.D.class)) {
throw new RuntimeException("hasAspect(D.class) should return false");
}
}
public void sayhi() { System.err.println("hi from B"); }
}
|