I have written a java annotation that looks like this:
@Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) // can I further limit this to only fields
I believe that this is not enforcable at compile-time - If you want to ensure that it is not on any inappropriate fields, you would have to check at run/load-time.