title: Obtain real Class object for Spring bean
body: <p>I am using Spring to inject beans. And I am using some annotations to annotate bean methods (Security, TransactionManagement, ExceptionHanling, Logging). The problem is:</p>
  
  <p><p>I want to create JUnit test to check if I forgot annotate some methods. But Spring returns $ProxyXXX class without any annotations on methods..</p>
  
  <pre><code>Method[] methods = logic.getClass().getMethods();
  
    for (Method method : methods) {
       Annotation[] annotations = method.getAnnotations();   // empty array!
  </code></pre>
  
  <p>How can I get annotations for method or obtain a real class object?</p>
  
  <p>P.S. Spring 2.5.6, JDKDynamicProxy (not CGLib)</p>