I don't think there is a way to enforce the developer to put annotation on subclass.
However, you can add the required annotations on your parent class and its subclass will "automatically" have the annotation without you explicitly specifying.
@RequiredAnnotations class Parent{ //... } // it will have @RequiredAnnotations without specifying class Child extend Parent{ //... }
It works with interface, concrete class or abstract class inheritance.
Like Pedro points out, the @RequiredAnnotation needs to have @Inherited to make it work.
@Inheritedhelps stackoverflow.com/questions/7173566/…