Although an annotation type is a special kind of interface that can be implemented by a concrete class, this is not its intended use. It is more likely that an annotation type should be used to annotate a class.

Ensure that any annotations are used to annotate a class, unless they are really supposed to be extended or implemented by the class.

In the following example, the annotation Deprecated is implemented by the class ImplementsAnnotation.

The following example shows the intended use of annotations: to annotate the class ImplementsAnnotationFix.

  • The Java Language Specification: Annotation Types.
  • The Java Tutorials: Annotations.
  • Help - Eclipse Platform: Java Compiler Errors/Warnings Preferences.