1. /*
  2. * @(#)AnnotationDesc.java 1.3 04/04/08
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.javadoc;
  8. /**
  9. * Represents an annotation.
  10. * An annotation associates a value with each element of an annotation type.
  11. *
  12. * @author Scott Seligman
  13. * @version 1.3 04/04/08
  14. * @since 1.5
  15. */
  16. public interface AnnotationDesc {
  17. /**
  18. * Returns the annotation type of this annotation.
  19. *
  20. * @return the annotation type of this annotation.
  21. */
  22. AnnotationTypeDoc annotationType();
  23. /**
  24. * Returns this annotation's elements and their values.
  25. * Only those explicitly present in the annotation are
  26. * included, not those assuming their default values.
  27. * Returns an empty array if there are none.
  28. *
  29. * @return this annotation's elements and their values.
  30. */
  31. ElementValuePair[] elementValues();
  32. /**
  33. * Represents an association between an annotation type element
  34. * and one of its values.
  35. *
  36. * @author Scott Seligman
  37. * @version 1.3 04/04/08
  38. * @since 1.5
  39. */
  40. public interface ElementValuePair {
  41. /**
  42. * Returns the annotation type element.
  43. *
  44. * @return the annotation type element.
  45. */
  46. AnnotationTypeElementDoc element();
  47. /**
  48. * Returns the value associated with the annotation type element.
  49. *
  50. * @return the value associated with the annotation type element.
  51. */
  52. AnnotationValue value();
  53. }
  54. }