title: If Java Annotation doesn't have business logic on it, then how does @Entity in JavaEE could map a class in database?
body: <p>I read somewhere that annotations are only metadata and do not contain any business logic.</p>
  <p>So I look at the code of @Entity annotation:</p>
  <pre><code>package javax.persistence;
  import java.lang.annotation.Documented;
  import java.lang.annotation.ElementType;
  import java.lang.annotation.Retention;
  import java.lang.annotation.RetentionPolicy;
  import java.lang.annotation.Target;
  
  @Documented
  @Target({ElementType.TYPE})
  @Retention(RetentionPolicy.RUNTIME)
  public @interface Entity {
      String name() default &quot;&quot;;
  }
  </code></pre>
  <p>Now, how this code could map a class to a database without a method define on it?</p>