1.1 --- a/src/share/classes/com/sun/tools/javadoc/Main.java Sat Oct 04 22:59:05 2008 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javadoc/Main.java Mon Oct 06 16:57:15 2008 -0700 1.3 @@ -61,6 +61,21 @@ 1.4 1.5 /** 1.6 * Programmatic interface. 1.7 + * @param args The command line parameters. 1.8 + * @param docletParentClassLoader The parent class loader used when 1.9 + * creating the doclet classloader. If null, the class loader used 1.10 + * to instantiate doclets will be created without specifying a parent 1.11 + * class loader. 1.12 + * @return The return code. 1.13 + * @since 1.7 1.14 + */ 1.15 + public static int execute(ClassLoader docletParentClassLoader, String... args) { 1.16 + Start jdoc = new Start(docletParentClassLoader); 1.17 + return jdoc.begin(args); 1.18 + } 1.19 + 1.20 + /** 1.21 + * Programmatic interface. 1.22 * @param programName Name of the program (for error messages). 1.23 * @param args The command line parameters. 1.24 * @return The return code. 1.25 @@ -73,6 +88,22 @@ 1.26 /** 1.27 * Programmatic interface. 1.28 * @param programName Name of the program (for error messages). 1.29 + * @param args The command line parameters. 1.30 + * @param docletParentClassLoader The parent class loader used when 1.31 + * creating the doclet classloader. If null, the class loader used 1.32 + * to instantiate doclets will be created without specifying a parent 1.33 + * class loader. 1.34 + * @return The return code. 1.35 + * @since 1.7 1.36 + */ 1.37 + public static int execute(String programName, ClassLoader docletParentClassLoader, String... args) { 1.38 + Start jdoc = new Start(programName, docletParentClassLoader); 1.39 + return jdoc.begin(args); 1.40 + } 1.41 + 1.42 + /** 1.43 + * Programmatic interface. 1.44 + * @param programName Name of the program (for error messages). 1.45 * @param defaultDocletClassName Fully qualified class name. 1.46 * @param args The command line parameters. 1.47 * @return The return code. 1.48 @@ -87,6 +118,26 @@ 1.49 /** 1.50 * Programmatic interface. 1.51 * @param programName Name of the program (for error messages). 1.52 + * @param defaultDocletClassName Fully qualified class name. 1.53 + * @param docletParentClassLoader The parent class loader used when 1.54 + * creating the doclet classloader. If null, the class loader used 1.55 + * to instantiate doclets will be created without specifying a parent 1.56 + * class loader. 1.57 + * @param args The command line parameters. 1.58 + * @return The return code. 1.59 + * @since 1.7 1.60 + */ 1.61 + public static int execute(String programName, 1.62 + String defaultDocletClassName, 1.63 + ClassLoader docletParentClassLoader, 1.64 + String... args) { 1.65 + Start jdoc = new Start(programName, defaultDocletClassName, docletParentClassLoader); 1.66 + return jdoc.begin(args); 1.67 + } 1.68 + 1.69 + /** 1.70 + * Programmatic interface. 1.71 + * @param programName Name of the program (for error messages). 1.72 * @param errWriter PrintWriter to receive error messages. 1.73 * @param warnWriter PrintWriter to receive error messages. 1.74 * @param noticeWriter PrintWriter to receive error messages. 1.75 @@ -105,4 +156,33 @@ 1.76 defaultDocletClassName); 1.77 return jdoc.begin(args); 1.78 } 1.79 + 1.80 + /** 1.81 + * Programmatic interface. 1.82 + * @param programName Name of the program (for error messages). 1.83 + * @param errWriter PrintWriter to receive error messages. 1.84 + * @param warnWriter PrintWriter to receive error messages. 1.85 + * @param noticeWriter PrintWriter to receive error messages. 1.86 + * @param defaultDocletClassName Fully qualified class name. 1.87 + * @param docletParentClassLoader The parent class loader used when 1.88 + * creating the doclet classloader. If null, the class loader used 1.89 + * to instantiate doclets will be created without specifying a parent 1.90 + * class loader. 1.91 + * @param args The command line parameters. 1.92 + * @return The return code. 1.93 + * @since 1.7 1.94 + */ 1.95 + public static int execute(String programName, 1.96 + PrintWriter errWriter, 1.97 + PrintWriter warnWriter, 1.98 + PrintWriter noticeWriter, 1.99 + String defaultDocletClassName, 1.100 + ClassLoader docletParentClassLoader, 1.101 + String... args) { 1.102 + Start jdoc = new Start(programName, 1.103 + errWriter, warnWriter, noticeWriter, 1.104 + defaultDocletClassName, 1.105 + docletParentClassLoader); 1.106 + return jdoc.begin(args); 1.107 + } 1.108 }