title: Why isAnnotationPresent(Id.class) is not working for the class file
body: <p>I have a class file <code>test.class</code>. In that file there is  annotations as <code>@Id</code> and <code>@Entity</code>. But when i check for the annotation with the method <code>field.isAnnotationPresent(Id.class)</code>, it returns <code>false</code>. I am getting all the fields in field variable. </p>
  
  <p>Can any body tell me what mistake i did.</p>
  
  <p>update:am using the following code to get the class </p>
  
  <pre><code>File file=new File("D:/test/");
  URL url=file.toURL();
  URL[] urls=new URL[]{url};
  ClassLoader loader=new URLClassLoader(urls);
  Class cls=loader.loadClass("com.net.test.Test");
  </code></pre>