title: Java - Why is Enum<E> not allowed as Annotation member?
body: <p>It says:</p>
  
  <blockquote>
    <p>primitive</p>
    
    <p>String</p>
    
    <p>Class</p>
    
    <p>an Enum</p>
    
    <p>another Annotation</p>
    
    <p>an array of any of the above</p>
  </blockquote>
  
  <p>Only these types are legal to be as Annotation member, why can't a generic Enum be a member of Annotation?</p>
  
  <p>For example :</p>
  
  <pre><code>@Retention(RetentionPolicy.RUNTIME)
  @Target(ElementType.PARAMETER)
  public @interface Param {
  
      Enum value();
  
  }
  </code></pre>
  
  <p>This is not allowed. But Enum is a constant isn't it? As you are using <code>@Param(XXX)</code>, filling in the <code>Enum</code>, the <code>@Param(XXX)</code> is decided (which means this is constant). Why is it only a specific enum allowed to be a member?</p>
  
  <p>What I am trying to do is to make a Annotation that receives any enums:</p>
  
  <pre><code>// for example
  @Param(value = AEnum.ABC)
  @Param(value = BEnum.TTT)
  @Param(value = CEnum.OOO)
  </code></pre>
  
  <p>I want all above to be legal.</p>