1. /*
  2. * @(#)FieldDoc.java 1.7 02/10/01
  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 field in a java class.
  10. *
  11. * @see MemberDoc
  12. *
  13. * @since JDK1.2
  14. * @author Robert Field
  15. */
  16. public interface FieldDoc extends MemberDoc {
  17. /**
  18. * Get type of this field.
  19. */
  20. Type type();
  21. /**
  22. * Return true if this field is transient
  23. */
  24. boolean isTransient();
  25. /**
  26. * Return true if this field is volatile
  27. */
  28. boolean isVolatile();
  29. /**
  30. * Return the serialField tags in this FieldDoc item.
  31. *
  32. * @return an array of <tt>SerialFieldTag</tt> objects containing
  33. * all <code>@serialField</code> tags.
  34. */
  35. SerialFieldTag[] serialFieldTags();
  36. /**
  37. * Get the value of a constant field.
  38. *
  39. * @return the value of a constant field. The value is
  40. * automatically wrapped in an object if it has a primitive type.
  41. * If the field is not constant, returns null.
  42. */
  43. Object constantValue();
  44. /**
  45. * Get the value of a constant field.
  46. *
  47. * @return the text of a Java language expression whose value
  48. * is the value of the constant. The expression uses no identifiers
  49. * other than primitive literals. If the field is
  50. * not constant, returns null.
  51. */
  52. String constantValueExpression();
  53. }