6748601: javadoc API should allow varargs use
authorjjg
Wed, 01 Oct 2008 16:26:33 -0700
changeset 1363 d7fc53d64560
parent 1361 63a59b0dc7fb
child 1364 5ee66e9b9a00
6748601: javadoc API should allow varargs use Reviewed-by: bpatel
langtools/src/share/classes/com/sun/tools/javadoc/Main.java
langtools/src/share/classes/com/sun/tools/javadoc/Start.java
--- a/langtools/src/share/classes/com/sun/tools/javadoc/Main.java	Mon Sep 29 22:11:26 2008 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/Main.java	Wed Oct 01 16:26:33 2008 -0700
@@ -45,7 +45,7 @@
      * Command line interface.
      * @param args   The command line parameters.
      */
-    public static void main(String[] args) {
+    public static void main(String... args) {
         System.exit(execute(args));
     }
 
@@ -54,7 +54,7 @@
      * @param args   The command line parameters.
      * @return The return code.
      */
-    public static int execute(String[] args) {
+    public static int execute(String... args) {
         Start jdoc = new Start();
         return jdoc.begin(args);
     }
@@ -65,7 +65,7 @@
      * @param args   The command line parameters.
      * @return The return code.
      */
-    public static int execute(String programName, String[] args) {
+    public static int execute(String programName, String... args) {
         Start jdoc = new Start(programName);
         return jdoc.begin(args);
     }
@@ -79,7 +79,7 @@
      */
     public static int execute(String programName,
                               String defaultDocletClassName,
-                              String[] args) {
+                              String... args) {
         Start jdoc = new Start(programName, defaultDocletClassName);
         return jdoc.begin(args);
     }
@@ -99,7 +99,7 @@
                               PrintWriter warnWriter,
                               PrintWriter noticeWriter,
                               String defaultDocletClassName,
-                              String[] args) {
+                              String... args) {
         Start jdoc = new Start(programName,
                                errWriter, warnWriter, noticeWriter,
                                defaultDocletClassName);
--- a/langtools/src/share/classes/com/sun/tools/javadoc/Start.java	Mon Sep 29 22:11:26 2008 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/Start.java	Wed Oct 01 16:26:33 2008 -0700
@@ -28,17 +28,11 @@
 import com.sun.javadoc.*;
 
 import com.sun.tools.javac.main.CommandLine;
-import com.sun.tools.javac.main.JavaCompiler;
 import com.sun.tools.javac.util.Context;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.ListBuffer;
 import com.sun.tools.javac.util.Options;
 
-import com.sun.tools.javadoc.Messager;
-import com.sun.tools.javadoc.DocletInvoker;
-import com.sun.tools.javadoc.RootDocImpl;
-import com.sun.tools.javadoc.ModifierFilter;
-
 import java.io.IOException;
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -139,7 +133,7 @@
     /**
      * Main program - external wrapper
      */
-    int begin(String argv[]) {
+    int begin(String... argv) {
         boolean failed = false;
 
         try {
@@ -178,7 +172,7 @@
     /**
      * Main program - internal
      */
-    private boolean parseAndExecute(String argv[]) throws IOException {
+    private boolean parseAndExecute(String... argv) throws IOException {
         long tm = System.currentTimeMillis();
 
         ListBuffer<String> javaNames = new ListBuffer<String>();