dims 2002/06/06 07:35:58 Modified: java/src/org/apache/axis/handlers JWSProcessor.java java/src/org/apache/axis/utils/compiler AbstractCompiler.java Compiler.java Jikes.java Log: - Compiler can now compile multiple files in one shot. Revision Changes Path 1.49 +1 -1 xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java Index: JWSProcessor.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- JWSProcessor.java 5 Jun 2002 23:26:07 -0000 1.48 +++ JWSProcessor.java 6 Jun 2002 14:35:58 -0000 1.49 @@ -211,7 +211,7 @@ compiler.setClasspath(getDefaultClasspath(msgContext)); compiler.setDestination(outdir); - compiler.setFile(jFile); + compiler.addFile(jFile); boolean result = compiler.compile(); 1.3 +11 -9 xml-axis/java/src/org/apache/axis/utils/compiler/AbstractCompiler.java Index: AbstractCompiler.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/compiler/AbstractCompiler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AbstractCompiler.java 18 Feb 2002 23:44:17 -0000 1.2 +++ AbstractCompiler.java 6 Jun 2002 14:35:58 -0000 1.3 @@ -60,20 +60,21 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.util.List; +import java.util.ArrayList; /** * This class implements the functionality common to all Java compilers. * @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a> * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> - * @version $Revision: 1.2 $ $Date: 2002/02/18 23:44:17 $ + * @version $Revision: 1.3 $ $Date: 2002/06/06 14:35:58 $ * @since 2.0 */ public abstract class AbstractCompiler implements Compiler { /** - * The source program filename + * The source program filenames */ - protected String file; + protected ArrayList fileList = new ArrayList(); /** * The name of the directory containing the source program file @@ -102,12 +103,12 @@ protected InputStream errors; /** - * Set the name of the file containing the source program + * Add the name of the file containing the source program to the file list * * @param file The name of the file containing the source program */ - public void setFile(String file) { - this.file = file; + public void addFile(String file) { + this.fileList.add(file); } /** @@ -214,14 +215,15 @@ */ protected String[] toStringArray(List arguments) { int i; - String[] args = new String[arguments.size() + 1]; + String[] args = new String[arguments.size() + fileList.size()]; for (i = 0; i < arguments.size(); i++) { args[i] = (String) arguments.get(i); } - args[i] = file; - + for (int j=0; j < fileList.size(); i++,j++) { + args[i] = (String)fileList.get(j); + } return args; } } 1.2 +2 -2 xml-axis/java/src/org/apache/axis/utils/compiler/Compiler.java Index: Compiler.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/compiler/Compiler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Compiler.java 10 Dec 2001 22:25:53 -0000 1.1 +++ Compiler.java 6 Jun 2002 14:35:58 -0000 1.2 @@ -63,7 +63,7 @@ * (Java-based) compiled languages * @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a> * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> - * @version $Revision: 1.1 $ $Date: 2001/12/10 22:25:53 $ + * @version $Revision: 1.2 $ $Date: 2002/06/06 14:35:58 $ * @since 2.0 */ public interface Compiler { @@ -72,7 +72,7 @@ * * @param file The name of the file containing the source program */ - void setFile(String file); + void addFile(String file); /** * Set the name of the directory containing the source program file 1.7 +5 -3 xml-axis/java/src/org/apache/axis/utils/compiler/Jikes.java Index: Jikes.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/compiler/Jikes.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Jikes.java 15 Mar 2002 01:14:11 -0000 1.6 +++ Jikes.java 6 Jun 2002 14:35:58 -0000 1.7 @@ -75,7 +75,7 @@ * NOTE: inspired by the Apache Jasper implementation. * @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a> * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> - * @version $Revision: 1.6 $ $Date: 2002/03/15 01:14:11 $ + * @version $Revision: 1.7 $ $Date: 2002/06/06 14:35:58 $ * @since 2.0 */ @@ -144,12 +144,14 @@ } } - String[] args = new String[arguments.size() + 1]; + String[] args = new String[arguments.size() + fileList.size()]; for (i = 0; i < arguments.size(); i++) { args[i] = (String) arguments.get(i); } - args[i] = file; + for (int j=0; j < fileList.size(); i++,j++) { + args[i] = (String)fileList.get(j); + } return args; }