blob: 7b1bb195027d778166f6453093ceb9064c117c1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// HasMethod with anno value matching
@interface I {
Class i();
}
aspect A {
declare parents: hasmethod(@I(i=String.class) * *(..)) implements java.io.Serializable;
}
public class B {
@I(i=String.class) public void m() {}
public static void main(String []argv) {
B b = new B();
if (!(b instanceof java.io.Serializable)) throw new IllegalStateException("");
}
}
class C {
@I(i=Integer.class) public void m() {}
}
|