1. /*
  2. * @(#)ElementType.java 1.6 04/03/16
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.lang.annotation;
  8. /**
  9. * A program element type. The constants of this enumerated type
  10. * provide a simple classification of the declared elements in a
  11. * Java program.
  12. *
  13. * <p>These constants are used with the {@link Target} meta-annotation type
  14. * to specify where it is legal to use an annotation type.
  15. *
  16. * @author Joshua Bloch
  17. * @since 1.5
  18. */
  19. public enum ElementType {
  20. /** Class, interface (including annotation type), or enum declaration */
  21. TYPE,
  22. /** Field declaration (inlcudes enum constants) */
  23. FIELD,
  24. /** Method declaration */
  25. METHOD,
  26. /** Parameter declaration */
  27. PARAMETER,
  28. /** Constructor declaration */
  29. CONSTRUCTOR,
  30. /** Local variable declaration */
  31. LOCAL_VARIABLE,
  32. /** Annotation type declaration */
  33. ANNOTATION_TYPE,
  34. /** Package declaration */
  35. PACKAGE
  36. }