Wednesday, April 27, 2011

Restrictions on annotations

  1. No annotation can inherit another.
  2. All methods declared by an annotation must be without parameters.
  3. Annotations cannot be generic.
  4. They cannot specify a throws clause.
Also they are allowed to return only :
  • primitives
  • String
  • Class
  • enum
  • array of the above types

No comments:

Post a Comment

Chitika