title: How to call a superclass method using Java reflection
body: <p>I have two classes:</p>
  
  <pre><code>public class A {
      public Object method() {...}
  }
  
  public class B extends A {
      @Override
      public Object method() {...}
  }
  </code></pre>
  
  <p>I have an instance of <code>B</code>.  How do I call <code>A.method()</code> from <code>b</code>?  Basically, the same effect as calling <code>super.method()</code> from <code>B</code>.</p>
  
  <pre><code>B b = new B();
  Class&lt;?&gt; superclass = b.getClass().getSuperclass();
  Method method = superclass.getMethod("method", ArrayUtils.EMPTY_CLASS_ARRAY);
  Object value = method.invoke(obj, ArrayUtils.EMPTY_OBJECT_ARRAY);
  </code></pre>
  
  <p>But the above code will still invoke <code>B.method()</code>.</p>