1 Reply Latest reply: Apr 7, 2011 7:09 PM by EJP RSS

    Is it possible to pass a subinterface to super without type params

    Asrivast-Oracle
      Hi,
      I have the following interfaces that do not support generics:

      public interface SuperIn {
      Object process(SuperEntry e);
      }

      I want to do the following:

      public interface MyEntry extends SuperEntry {
      void doSomething();
      }

      and then pass MyEntry as:

      public class MyImpl implements SuperIn {
      public Object process (MyEntry e) {
      }
      }

      As SuperIn and SuperEntry interfaces do not support Generics the only way I could imagine is through instanceof? Is there a way?

      Thanks,