title: How to get annotation from overridden method in Java?
body: <p>I have the following situation</p>
  
  <pre><code>class Parent {
      @SomeAnnotation(someValue)
      public void someMethod(){...}
  }
  
  class Child extends Parent {
      @Override
      public void someMethod(){...}
  }
  </code></pre>
  
  <p>And I need to get <code>@SomeAnnotation</code> when I have reference to method <code>Child.someMethod</code>.</p>
  
  <p>Using <code>Child.getSuperclass()</code> I can get <code>Parent.class</code>. Besides, I found a solution <a href="https://stackoverflow.com/a/15674467/5057736">here</a> to get reference to <code>MethodHandle</code> of <code>Parent.someMethod</code>, so I have</p>
  
  <pre><code>MethodHandle parentMethodHandle = MethodHandles.lookup().findSpecial(
          Parent.class, childSomeMethod.getName(),
          MethodType.methodType(Void.class), Child.class);
  </code></pre>
  
  <p>However, I can't find a way to get reference to method <code>Parent.someMethod</code> from <code>parentMethodHandle</code> to <code>getAnnotation()</code> from it. Please, help.</p>