scheu       02/05/15 14:47:44

  Modified:    java/src/org/apache/axis/wsdl Java2WSDL.java
               java/src/org/apache/axis/wsdl/fromJava Emitter.java
  Log:
  Changed Java2WSDL --stopClasses, --methods, and --exclude to allow duplicate option 
settings.
  
  Revision  Changes    Path
  1.16      +3 -3      xml-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java
  
  Index: Java2WSDL.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Java2WSDL.java    15 May 2002 20:22:01 -0000      1.15
  +++ Java2WSDL.java    15 May 2002 21:47:43 -0000      1.16
  @@ -139,7 +139,7 @@
                   PACKAGE_OPT,
                   JavaUtils.getMessage("j2woptPkgtoNS00")),
           new CLOptionDescriptor("methods",
  -                CLOptionDescriptor.ARGUMENT_REQUIRED,
  +                CLOptionDescriptor.DUPLICATES_ALLOWED + 
CLOptionDescriptor.ARGUMENT_REQUIRED,
                   METHODS_ALLOWED_OPT,
                   JavaUtils.getMessage("j2woptmethods00")),
           new CLOptionDescriptor("all",
  @@ -167,11 +167,11 @@
                   IMPL_CLASS_OPT,
                   JavaUtils.getMessage("j2woptimplClass00")),
           new CLOptionDescriptor("exclude",
  -                CLOptionDescriptor.ARGUMENT_REQUIRED,
  +                CLOptionDescriptor.DUPLICATES_ALLOWED + 
CLOptionDescriptor.ARGUMENT_REQUIRED,
                   METHODS_NOTALLOWED_OPT,
                    JavaUtils.getMessage("j2woptexclude00")),
           new CLOptionDescriptor("stopClasses",
  -                CLOptionDescriptor.ARGUMENT_REQUIRED,
  +                CLOptionDescriptor.DUPLICATES_ALLOWED + 
CLOptionDescriptor.ARGUMENT_REQUIRED,
                   STOP_CLASSES_OPT,
                   JavaUtils.getMessage("j2woptstopClass00")),
           new CLOptionDescriptor("typeMappingVersion",
  
  
  
  1.33      +28 -12    xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Emitter.java      10 May 2002 22:38:50 -0000      1.32
  +++ Emitter.java      15 May 2002 21:47:43 -0000      1.33
  @@ -120,7 +120,7 @@
       private Class implCls;                 // Optional implementation class
       private Vector allowedMethods = null;  // Names of methods to consider
       private Vector disallowedMethods = null; // Names of methods to exclude
  -    private ArrayList stopClasses = null;// class names which halt inheritace 
searches
  +    private ArrayList stopClasses = new ArrayList();// class names which halt 
inheritace searches
       private boolean useInheritedMethods = false;
       private String intfNS;
       private String implNS;
  @@ -1122,12 +1122,14 @@
       }
   
       /**
  -     * Set a list of methods to export
  +     * Add a list of methods to export
        */
       public void setAllowedMethods(String text) {
           if (text != null) {
               StringTokenizer tokenizer = new StringTokenizer(text, " ,+");
  -            allowedMethods = new Vector();
  +            if (allowedMethods == null) {
  +                allowedMethods = new Vector();
  +            }
               while (tokenizer.hasMoreTokens()) {
                   allowedMethods.add(tokenizer.nextToken());
               }
  @@ -1135,11 +1137,14 @@
       }
   
       /**
  -     * Set a Vector of methods to export
  +     * Add a Vector of methods to export
        * @param allowedMethods a vector of methods to export
        */
       public void setAllowedMethods(Vector allowedMethods) {
  -        this.allowedMethods = allowedMethods;
  +        if (this.allowedMethods == null) {
  +            this.allowedMethods = new Vector();
  +        }
  +        this.allowedMethods.addAll(allowedMethods);
       }
   
       /**
  @@ -1157,20 +1162,26 @@
       }
   
       /**
  -     * Set a list of methods NOT to export
  +     * Add a list of methods NOT to export
        * @param disallowedMethods vector of method name strings
        */
       public void setDisallowedMethods(Vector disallowedMethods) {
  -        this.disallowedMethods = disallowedMethods;
  +        if (this.disallowedMethods == null) {
  +            this.disallowedMethods = new Vector();
  +        }
  +        this.disallowedMethods.addAll(disallowedMethods);
       }
   
       /**
  -     * Set a list of methods NOT to export
  +     * Add a list of methods NOT to export
        * @param text space separated list of method names
        */
       public void setDisallowedMethods(String text) {
           if (text != null) {
               StringTokenizer tokenizer = new StringTokenizer(text, " ,+");
  +            if (disallowedMethods == null) {
  +                disallowedMethods = new Vector();
  +            }
               disallowedMethods = new Vector();
               while (tokenizer.hasMoreTokens()) {
                   disallowedMethods.add(tokenizer.nextToken());
  @@ -1186,17 +1197,20 @@
       }
   
       /**
  -     * Set a list of classes (fully qualified) that will stop the traversal
  +     * Adds a list of classes (fully qualified) that will stop the traversal
        * of the inheritance tree if encounter in method or complex type generation
        *
        * @param stopClasses vector of class name strings
        */
       public void setStopClasses(ArrayList stopClasses) {
  -        this.stopClasses = stopClasses;
  +        if (this.stopClasses == null) {
  +            this.stopClasses = new ArrayList();
  +        }
  +        this.stopClasses.addAll(stopClasses);
       }
   
       /**
  -     * Set a list of classes (fully qualified) that will stop the traversal
  +     * Add a list of classes (fully qualified) that will stop the traversal
        * of the inheritance tree if encounter in method or complex type generation
        *
        * @param text space separated list of class names
  @@ -1204,7 +1218,9 @@
       public void setStopClasses(String text) {
           if (text != null) {
               StringTokenizer tokenizer = new StringTokenizer(text, " ,+");
  -            stopClasses = new ArrayList();
  +            if (stopClasses == null) {
  +                stopClasses = new ArrayList();
  +            }
               while (tokenizer.hasMoreTokens()) {
                   stopClasses.add(tokenizer.nextToken());
               }
  
  
  


Reply via email to