title: Class.getAnnotations() / getDeclaredAnnotations() returns empty array for subclass
body: <p>I have an annotation defined like:</p>
  
  <pre><code>@Inherited
  @Retention(RetentionPolicy.RUNTIME)
  @Target(ElementType.TYPE)
  @interface Retriable {
  
  }
  </code></pre>
  
  <p>And I'm using it like this:</p>
  
  <pre><code>@Retriable
  interface MyInterface {
      public void myMethod();
  }
  </code></pre>
  
  <p>Now, I have a second interface, which extends the first:</p>
  
  <pre><code>interface MySecondInterface extends MyInterface {
  
  }
  </code></pre>
  
  <p>I want to get <strong><em>all</em></strong> annotations for <code>MySecondInterface</code>, it means that I would like to also get the annotation(s) defined on super interfaces.</p>
  
  <p>What I tried:</p>
  
  <p>Class clazz = MySecondInterface.class;</p>
  
  <pre><code>Retriable annotation = clazz.getAnnotation(Retriable.class);
  System.out.println("Retriable annotation: " + annotation);
  
  Annotation[] annotations = clazz.getAnnotations();
  System.out.println("Annotations: " + Arrays.toString(annotations));
  
  annotations = clazz.getDeclaredAnnotations();
  System.out.println("Declared Annotations: " + Arrays.toString(annotations));
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>Retriable annotation: null
  Annotations: []
  Declared Annotations: []
  </code></pre>
  
  <p>In all cases it can't find the <code>Retriable</code> annotation inherited from <code>MyInterface</code>. (<a href="http://ideone.com/X8rJGG" rel="nofollow">DEMO</a>)</p>
  
  <p>Is there a way to make it recognize annotations of super-interface?</p>