あー、だからInterfaceOrAnnotationなのね。
public class Hoge { public static @interface Foo { } public class Bar implements Foo { public Class<? extends Annotation> annotationType() { return Foo.class; } } public static void main(String[] args) { new Foo() { public Class<? extends Annotation> annotationType() { return Foo.class; } }; } }
気持ちはわかるが勘弁してください。