title: isAnnotationPresent() return false when used with super type reference in Java
body: <p>I m trying to get the annotation details from super type reference variable using reflection, to make the method accept all sub types. But <code>isAnnotationPresent()</code> returning <code>false</code>. Same with other annotation related methods. If used on the exact type, output is as expected.</p>
  
  <p>I know that annotation info will be available on the Object even I m referring through super type.</p>
  
  <pre><code>@Retention(RetentionPolicy.RUNTIME)
  @Target({ElementType.TYPE})
  public @interface Table {
      String name();
  }
  @Table(name = "some_table")
  public class SomeEntity {
  
      public static void main(String[] args) {
          System.out.println(SomeEntity.class.isAnnotationPresent(Table.class)); // true
          System.out.println(new SomeEntity().getClass().isAnnotationPresent(Table.class)); // true
  
          Class&lt;?&gt; o1 = SomeEntity.class;
          System.out.println(o1.getClass().isAnnotationPresent(Table.class)); // false
  
          Class&lt;SomeEntity&gt; o2 = SomeEntity.class;
          System.out.println(o2.getClass().isAnnotationPresent(Table.class)); // false
  
          Object o3 = SomeEntity.class;
          System.out.println(o3.getClass().isAnnotationPresent(Table.class)); // false
      }
  }
  </code></pre>
  
  <p>How to get the annotation info?</p>