You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ExampleC.java 527B

1234567891011121314151617181920212223242526
  1. // ITD of a method onto a generic inner inner type
  2. interface I {
  3. interface J {
  4. interface K<T> {}
  5. }
  6. }
  7. aspect Bang {
  8. public int I.J.K<T>.intro(T t) {return 42;}
  9. }
  10. class Impl implements I {
  11. class InnerImpl implements J {
  12. class InnerInnerImpl implements K<String> {}
  13. }
  14. }
  15. public class ExampleC {
  16. public static void main(String []argv) {
  17. Impl i = new Impl();
  18. Impl.InnerImpl j = i.new InnerImpl();
  19. Impl.InnerImpl.InnerInnerImpl k = j.new InnerInnerImpl();
  20. System.out.println(k.intro("foo"));
  21. }
  22. }