1. /*
  2. * @(#)AnnotationValue.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 a value of an annotation type element.
  10. *
  11. * @author Scott Seligman
  12. * @version 1.3 04/04/08
  13. * @since 1.5
  14. */
  15. public interface AnnotationValue {
  16. /**
  17. * Returns the value.
  18. * The type of the returned object is one of the following:
  19. * <ul><li> a wrapper class for a primitive type
  20. * <li> <code>String</code>
  21. * <li> <code>Type</code> (representing a class literal)
  22. * <li> <code>FieldDoc</code> (representing an enum constant)
  23. * <li> <code>AnnotationDesc</code>
  24. * <li> <code>AnnotationValue[]</code>
  25. * </ul>
  26. *
  27. * @return the value.
  28. */
  29. Object value();
  30. /**
  31. * Returns a string representation of the value.
  32. *
  33. * @return the text of a Java language annotation value expression
  34. * whose value is the value of this element.
  35. */
  36. String toString();
  37. }