title: Is Java automatically caching annotations and class metadata?
body: <p>Java has a native support for annotations.</p>
  
  <p>I'm wondering if when I call <code>obj.getAnnotation(Test.class)</code>, java stores class metadata in any kind of cache.</p>
  
  <p>I have the same question with reflection like:</p>
  
  <pre><code>for (Method method : obj.getDeclaredMethods()) {
  
          if (method.isAnnotationPresent(Test.class)) {
  
              Annotation annotation = method.getAnnotation(Test.class);
              Test test = (Test) annotation;
  
          }
  }
  </code></pre>