1. /*
  2. * @(#)SerialFieldTag.java 1.9 04/05/05
  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. * Documents a Serializable field defined by an ObjectStreamField.
  10. * <pre>
  11. * The class parses and stores the three serialField tag parameters:
  12. *
  13. * - field name
  14. * - field type name
  15. * (fully-qualified or visible from the current import context)
  16. * - description of the valid values for the field
  17. * </pre>
  18. * This tag is only allowed in the javadoc for the special member
  19. * serialPersistentFields.
  20. *
  21. * @author Joe Fialli
  22. *
  23. * @see java.io.ObjectStreamField
  24. */
  25. public interface SerialFieldTag extends Tag, Comparable<Object> {
  26. /**
  27. * Return the serialziable field name.
  28. */
  29. public String fieldName();
  30. /**
  31. * Return the field type string.
  32. */
  33. public String fieldType();
  34. /**
  35. * Return the ClassDoc for field type.
  36. *
  37. * @return null if no ClassDoc for field type is visible from
  38. * containingClass context.
  39. */
  40. public ClassDoc fieldTypeDoc();
  41. /**
  42. * Return the field comment. If there is no serialField comment, return
  43. * javadoc comment of corresponding FieldDoc.
  44. */
  45. public String description();
  46. /**
  47. * Compares this Object with the specified Object for order. Returns a
  48. * negative integer, zero, or a positive integer as this Object is less
  49. * than, equal to, or greater than the given Object.
  50. * <p>
  51. * Included to make SerialFieldTag items java.lang.Comparable.
  52. *
  53. * @param obj the <code>Object</code> to be compared.
  54. * @return a negative integer, zero, or a positive integer as this Object
  55. * is less than, equal to, or greater than the given Object.
  56. * @exception ClassCastException the specified Object's type prevents it
  57. * from being compared to this Object.
  58. * @since JDK1.2
  59. */
  60. public int compareTo(Object obj);
  61. }