title: Java Annotation only with static fields
body: <p>Is there a way to define an Annotation in Java such that it can only be used with static fields?</p>
  
  <p>In <a href="https://stackoverflow.com/questions/5778326/define-annotation-only-applicable-to-static-methods">this</a> SO question someone asked pretty much the same question, but about static methods. Is it the same thing for fields? Has anything changed in the two years since that question was asked?</p>
  
  <p>Also, the answer to <a href="https://stackoverflow.com/questions/3422390/retrieve-only-static-fields-declared-in-java-class">this</a> question shows a way that I could filter out just the static variables. However, I'm expecting the code I'm building to be used by other people, so I don't want someone to use the annotation on a non-static field and then not have it work for them. I'd really like to be able to give them an error in their IDE letting them know that the annotation can only be used with static fields.</p>