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.

ExampleE.java 451B

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