--- a/langtools/src/share/classes/com/sun/tools/javadoc/Main.java Sat Oct 04 22:59:05 2008 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/Main.java Mon Oct 06 16:57:15 2008 -0700
@@ -61,6 +61,21 @@
/**
* Programmatic interface.
+ * @param args The command line parameters.
+ * @param docletParentClassLoader The parent class loader used when
+ * creating the doclet classloader. If null, the class loader used
+ * to instantiate doclets will be created without specifying a parent
+ * class loader.
+ * @return The return code.
+ * @since 1.7
+ */
+ public static int execute(ClassLoader docletParentClassLoader, String... args) {
+ Start jdoc = new Start(docletParentClassLoader);
+ return jdoc.begin(args);
+ }
+
+ /**
+ * Programmatic interface.
* @param programName Name of the program (for error messages).
* @param args The command line parameters.
* @return The return code.
@@ -73,6 +88,22 @@
/**
* Programmatic interface.
* @param programName Name of the program (for error messages).
+ * @param args The command line parameters.
+ * @param docletParentClassLoader The parent class loader used when
+ * creating the doclet classloader. If null, the class loader used
+ * to instantiate doclets will be created without specifying a parent
+ * class loader.
+ * @return The return code.
+ * @since 1.7
+ */
+ public static int execute(String programName, ClassLoader docletParentClassLoader, String... args) {
+ Start jdoc = new Start(programName, docletParentClassLoader);
+ return jdoc.begin(args);
+ }
+
+ /**
+ * Programmatic interface.
+ * @param programName Name of the program (for error messages).
* @param defaultDocletClassName Fully qualified class name.
* @param args The command line parameters.
* @return The return code.
@@ -87,6 +118,26 @@
/**
* Programmatic interface.
* @param programName Name of the program (for error messages).
+ * @param defaultDocletClassName Fully qualified class name.
+ * @param docletParentClassLoader The parent class loader used when
+ * creating the doclet classloader. If null, the class loader used
+ * to instantiate doclets will be created without specifying a parent
+ * class loader.
+ * @param args The command line parameters.
+ * @return The return code.
+ * @since 1.7
+ */
+ public static int execute(String programName,
+ String defaultDocletClassName,
+ ClassLoader docletParentClassLoader,
+ String... args) {
+ Start jdoc = new Start(programName, defaultDocletClassName, docletParentClassLoader);
+ return jdoc.begin(args);
+ }
+
+ /**
+ * Programmatic interface.
+ * @param programName Name of the program (for error messages).
* @param errWriter PrintWriter to receive error messages.
* @param warnWriter PrintWriter to receive error messages.
* @param noticeWriter PrintWriter to receive error messages.
@@ -105,4 +156,33 @@
defaultDocletClassName);
return jdoc.begin(args);
}
+
+ /**
+ * Programmatic interface.
+ * @param programName Name of the program (for error messages).
+ * @param errWriter PrintWriter to receive error messages.
+ * @param warnWriter PrintWriter to receive error messages.
+ * @param noticeWriter PrintWriter to receive error messages.
+ * @param defaultDocletClassName Fully qualified class name.
+ * @param docletParentClassLoader The parent class loader used when
+ * creating the doclet classloader. If null, the class loader used
+ * to instantiate doclets will be created without specifying a parent
+ * class loader.
+ * @param args The command line parameters.
+ * @return The return code.
+ * @since 1.7
+ */
+ public static int execute(String programName,
+ PrintWriter errWriter,
+ PrintWriter warnWriter,
+ PrintWriter noticeWriter,
+ String defaultDocletClassName,
+ ClassLoader docletParentClassLoader,
+ String... args) {
+ Start jdoc = new Start(programName,
+ errWriter, warnWriter, noticeWriter,
+ defaultDocletClassName,
+ docletParentClassLoader);
+ return jdoc.begin(args);
+ }
}