Interface

Annotation

Return type of a method declared in an annotation type is - one of the primitive types,String, Class and any invocation of Class, an enum type (§8.9), an annotation type, or an array (§10) of one of the preceding types.

Each method declaration in an annotation type declaration defines an element of the annotation type.


  1. Nested Annotation
  2. Meta-Annotations



• Annotation type declarations cannot be generic.
• No extends clause is permitted. (Annotation types implicitly extend annotation.Annotation.)
• Methods cannot have any parameters
• Methods cannot have any type parameters
• Method declarations cannot have a throws clause

No comments:

Post a Comment