title: Java reflection (and annotations): bean.class is empty
body: <p>I jave a simple Java bean with 4 attributes, getter/setter, and some overided methods like toString, equals and hashCode.</p>
  
  <p>Above every Attribute is a custom Annotation:</p>
  
  <pre><code>import java.lang.annotation.*;
  import java.lang.annotation.RetentionPolicy;
  
  @Target(ElementType.FIELD)
  @Retention( RetentionPolicy.RUNTIME )
  public @interface DAOProperty {
  
      String name();
      String type();
      boolean identifier() default false;
  
  }
  
  /** The id. */
  @DAOProperty(name = "id", type = "long", identifier = true)
  private long id;
  </code></pre>
  
  <p>If I pass the bean.class to another method</p>
  
  <pre><code>generateEntity(User.class);
  </code></pre>
  
  <p>...</p>
  
  <pre><code>private static MEntity generateEntity(Class&lt;?&gt; bean) {...}
  </code></pre>
  
  <p>and debug it, it seems to bee empty, except for the class name. All arrays like methods, annotations and fields are of zero size.</p>
  
  <p>Where did I go wrong?</p>