title: Reflection on interface overridden methods
body: <p>I have the following code, with a generic <code>ITest</code> interface extended by a not generic <code>ITestDouble</code> interface. The <code>op</code> method is overridden by <code>ITestDouble</code>.</p>
  
  <p>When I try to list all the methods of <code>ITestDouble</code>, I get <code>op</code> twice. How can I verify that they are actually the same method?</p>
  
  <pre><code>public class Test {
  
      public static void main(String[] args) throws NoSuchMethodException {
          for (Method m : ITestDouble.class.getMethods()) {
              System.out.println(m.getDeclaringClass() + ": " + m + "(bridge: " + m.isBridge() + ")");
          }
      }
  
      public interface ITestDouble extends ITest&lt;Double&gt; {
          @Override
          public int op(Double value);
  
          @Override
          public void other();
      }
  
      public interface ITest&lt;T extends Number&gt; {
          public int op(T value);
  
          public void other();
      }
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>interface Test$ITestDouble: public abstract int Test$ITestDouble.op(java.lang.Double)(bridge: false)
  interface Test$ITestDouble: public abstract void Test$ITestDouble.other()(bridge: false)
  interface Test$ITest: public abstract int Test$ITest.op(java.lang.Number)(bridge: false)
  </code></pre>
  
  <p>PS I know this is the same question as <a href="https://stackoverflow.com/questions/6204339/java-class-getmethods-behavior-on-overridden-methods">Java Class.getMethods() behavior on overridden methods</a>, but that question got no real answer: the <code>isBridge()</code> call always returns <code>false</code>.</p>
  
  <p>EDIT:
  I'm also fine with any library which would do the dirty job of filtering out the "duplicate" <code>op</code> method for me.</p>