Inspectopedia
 
2025.2

Class extends annotation interface

Warning
Last modified: Last modified: 18 September 2025

Reports classes declared as an implementation or extension of an annotation interface.

While it is legal to extend an annotation interface, it is often done by accident, and the result can't be used as an annotation.

This inspection depends on the Java feature 'Annotations', which is available since Java 5.