import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; @Target({METHOD, FIELD}) @Retention(RUNTIME) public @interface MyAnnotation { String dummy1() default ""; String dummy2() default ""; }