blob: 7f2861b53b630c8c468836ff1b4555bf6788f8b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package test;
public class X {
public static void main(String[]argv) {
TestClass t = new TestClass();
if (!(t instanceof Interface1)) throw new RuntimeException("t not instanceof Interface1");
if (!(t instanceof Interface1TestClass)) throw new RuntimeException("t not instanceof Interface1TestClass");
}
}
interface Interface1 {}
interface Interface1TestClass {}
aspect TestAspect {
declare parents:
TestClass implements Interface1;
declare parents:
TestClass && Interface1+ implements Interface1TestClass;
}
class TestClass {}
|