The Annotation Interface : Annotations Types « Language « Java Tutorial






  1. An annotation type is a Java interface.
  2. All annotation types are subinterfaces of the java.lang.annotation.Annotation interface.
  3. It has one method, annotation Type, that returns an java.lang.Class object.
java.lang.Class<? extends Annotation> annotationType()
In addition, any implementation of Annotation will override the equals, hashCode, and 
toString methods from the java.lang.Object class.








1.13.Annotations Types
1.13.1.Annotations and Annotation Types
1.13.2.The Annotation Interface
1.13.3.Using Default Values
1.13.4.Marker Annotations
1.13.5.Single-Member Annotations
1.13.6.Creates and uses a single-member annotation
1.13.7.The single-value syntax
1.13.8.Some Restrictions
1.13.9.A marker annotation