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.

ExampleA.java 416B

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