blob: 75de4151d39ef3a2a5ad1b232c6392d0eb879813 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// ITD of a method onto a generic inner type - complex example
interface I<P> {
interface J<Q> {
}
}
aspect Bang {
public int I<A>.J<B>.intro(A a,B b) {return 42;}
}
class Impl implements I<Integer> {
class InnerImpl implements J<String> {
}
}
public class ExampleE {
public static void main(String []argv) {
Impl i = new Impl();
Impl.InnerImpl j = i.new InnerImpl();
System.out.println(j.intro(new Integer(5),"foo"));
}
}
|