1. /*
  2. * @(#)RootDoc.java 1.13 02/10/06
  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 the root of the program structure information
  10. * for one run of javadoc. From this root all other program
  11. * structure information can be extracted.
  12. * Also represents the command line information -- the
  13. * packages, classes and options specified by the user.
  14. *
  15. * @since JDK1.2
  16. * @author Robert Field
  17. */
  18. public interface RootDoc extends Doc, DocErrorReporter {
  19. /**
  20. * Command line options.
  21. * <p>
  22. * For example, given:
  23. * <pre>
  24. * javadoc -foo this that -bar other ...</pre>
  25. *
  26. * this method will return:
  27. * <pre>
  28. * options()[0][0] = "-foo"
  29. * options()[0][1] = "this"
  30. * options()[0][2] = "that"
  31. * options()[1][0] = "-bar"
  32. * options()[1][1] = "other"</pre>
  33. *
  34. * @return an array of arrays of String.
  35. */
  36. String[][] options();
  37. /**
  38. * Return the packages
  39. * <a href="package-summary.html#included">specified</a>
  40. * on the command line.
  41. * If <code>-subpackages</code> and <code>-exclude</code> options
  42. * are used, return all the non-excluded packages.
  43. *
  44. * @return packages specified on the command line.
  45. */
  46. PackageDoc[] specifiedPackages();
  47. /**
  48. * Return the classes and interfaces
  49. * <a href="package-summary.html#included">specified</a>
  50. * as source file names on the command line.
  51. *
  52. * @return classes and interfaces specified on the command line.
  53. */
  54. ClassDoc[] specifiedClasses();
  55. /**
  56. * Return the
  57. * <a href="package-summary.html#included">included</a>
  58. classes and interfaces in all packages.
  59. *
  60. * @return included classes and interfaces in all packages.
  61. */
  62. ClassDoc[] classes();
  63. /**
  64. * Return a PackageDoc for the specified package name.
  65. *
  66. * @param name package name
  67. *
  68. * @return a PackageDoc holding the specified package, null if
  69. * this package is not referenced.
  70. */
  71. PackageDoc packageNamed(String name);
  72. /**
  73. * Return a ClassDoc for the specified class or interface name.
  74. *
  75. * @param qualifiedName
  76. * <a href="package-summary.html#qualified">qualified</a>
  77. * class or package name
  78. *
  79. * @return a ClassDoc holding the specified class, null if
  80. * this class is not referenced.
  81. */
  82. ClassDoc classNamed(String qualifiedName);
  83. }