code_junkie

Can I generate a compile time error based on the type of the field being Annotated

Nov 13th, 2011
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. @Retention(RetentionPolicy.RUNTIME)
  2. @Target(ElementType.FIELD) // can I further limit this to only fields of type DomainObject?
  3. public @interface Owns {
  4. }
Add Comment
Please, Sign In to add comment