An annotation type declaration is a special kind of interface declaration. To distinguish an annotation type declaration from an ordinary interface declaration, the keyword
interface is preceded by an at-sign (
Note that the at-sign (
@) and the keyword
interface are two distinct tokens. Technically it is possible to separate them with whitespace, but this is discouraged as a matter of style.
@ interface Identifier AnnotationTypeBodyAnnotationTypeBody:
}AnnotationTypeElementDeclarations: AnnotationTypeElementDeclaration AnnotationTypeElementDeclarations AnnotationTypeElementDeclaration
If an annotation a (§9.7) on an annotation ...