1. /*
  2. * @(#)PackageDoc.java 1.9 02/09/29
  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 java package. Provides access to information
  10. * about the package, the package's comment and tags, and the
  11. * classes in the package.
  12. * <p>
  13. * Each method whose return type is an array will return an empty
  14. * array (never null) when there are no objects in the result.
  15. *
  16. * @since JDK1.2
  17. * @author Kaiyang Liu (original)
  18. * @author Robert Field (rewrite)
  19. */
  20. public interface PackageDoc extends Doc {
  21. /**
  22. * Get all classes and interfaces in the package, filtered to the specified
  23. * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
  24. * modifier option</a>.
  25. *
  26. * @return filtered classes and interfaces in this package
  27. * @param filter Specifying true filters according to the specified access
  28. * modifier option.
  29. * Specifying false includes all classes and interfaces
  30. * regardless of access modifier option.
  31. * @since 1.4
  32. */
  33. ClassDoc[] allClasses(boolean filter);
  34. /**
  35. * Get all
  36. * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
  37. * classes and interfaces in the package. Same as allClasses(true).
  38. *
  39. * @return all included classes and interfaces in this package.
  40. */
  41. ClassDoc[] allClasses();
  42. /**
  43. * Get included
  44. * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#class">ordinary</a>
  45. * classes (that is, exclude exceptions, errors, enums, interfaces, and
  46. * annotation types)
  47. * in this package.
  48. *
  49. * @return included ordinary classes in this package.
  50. */
  51. ClassDoc[] ordinaryClasses();
  52. /**
  53. * Get included Exception classes in this package.
  54. *
  55. * @return included Exceptions in this package.
  56. */
  57. ClassDoc[] exceptions();
  58. /**
  59. * Get included Error classes in this package.
  60. *
  61. * @return included Errors in this package.
  62. */
  63. ClassDoc[] errors();
  64. /**
  65. * Get included enum types in this package.
  66. *
  67. * @return included enum types in this package.
  68. * @since 1.5
  69. */
  70. ClassDoc[] enums();
  71. /**
  72. * Get included interfaces in this package, omitting annotation types.
  73. *
  74. * @return included interfaces in this package.
  75. */
  76. ClassDoc[] interfaces();
  77. /**
  78. * Get included annotation types in this package.
  79. *
  80. * @return included annotation types in this package.
  81. * @since 1.5
  82. */
  83. AnnotationTypeDoc[] annotationTypes();
  84. /**
  85. * Get the annotations of this package.
  86. * Return an empty array if there are none.
  87. *
  88. * @return the annotations of this package.
  89. * @since 1.5
  90. */
  91. AnnotationDesc[] annotations();
  92. /**
  93. * Lookup a class or interface within this package.
  94. *
  95. * @return ClassDoc of found class or interface,
  96. * or null if not found.
  97. */
  98. ClassDoc findClass(String className);
  99. }