title: Strange behaviour on method annotations and default access level
body: <p>Here's my problem...</p>
  
  <p>I have an annotation in package pkg3:</p>
  
  <pre><code>package pkg3;
  
  import java.lang.annotation.*;
  
  @Retention(RetentionPolicy.RUNTIME)
  @Target(ElementType.METHOD)
  public @interface TestAnno {
  
  }
  </code></pre>
  
  <p>Also I have two classes in package pkg1, one with public access and one with default access</p>
  
  <pre><code>package pkg1;
  
  import pkg3.TestAnno;
  
  class Class1 {
  
      @TestAnno
      public void test1() { }
  
      public void test2() { }
  
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>package pkg1;
  
  import pkg3.TestAnno;
  
  public class Class2 extends Class1 {
  
      @TestAnno
      public void test3() { }
  
      public void test4() { }
  
  }
  </code></pre>
  
  <p>Finnally I've got a main class in package pkg2</p>
  
  <pre><code>package pkg2;
  
  import java.lang.reflect.Method;
  import pkg1.Class2;
  import pkg3.TestAnno;
  
  public class MainClass {
  
      public static void main(String[] args) {
  
          Class2 cls = new Class2();
          for(Method m: cls.getClass().getMethods()) {
              System.out.println(m);
              if (m.getAnnotation(TestAnno.class) != null) {
                  System.out.println("  &gt; hass anno");
              }
          }
  
      }
  
  }
  </code></pre>
  
  <p>Running this example I expect to see the info, that two methods have @TestAnno present - test1 and test3, but I only see one test3, and... what is strange, the methods test1 and test2 are listed as they were be declared in class Class2.</p>
  
  <pre><code>public void pkg1.Class2.test3()
    &gt; hass anno
  public void pkg1.Class2.test4()
  public void pkg1.Class2.test1()
  public void pkg1.Class2.test2()
  public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException
  ... rest methods from java.lang.Object
  </code></pre>
  
  <p>I know, that getMethods returns only public methods from given glass (and it's all super classes) but... this is strange for me.</p>
  
  <p>I'm using this in order to separate generated classes (which have default access) from implementation classes (which are public and they're extending generated classes).
  Have I to use public access in generated classes (I wanted them not to be visible to rest of the world) or is there any way to get annotated public methods from Class1 ?</p>