axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava GeneratedFileInfo.java JavaWriter.java JavaUndeployWriter.java JavaTestCaseWriter.java JavaStubWriter.java JavaSkelWriter.java JavaServiceImplWriter.java JavaInterfaceWriter.java JavaImplWriter.java JavaHolderWriter.java JavaFaultWriter.java JavaEnumTypeWriter.java JavaDeployWriter.java JavaComplexTypeWriter.java Emitter.java
Date Thu, 10 Jan 2002 20:08:52 GMT
tomj        02/01/10 12:08:52

  Modified:    java/src/org/apache/axis/wsdl WSDL2Java.java
               java/src/org/apache/axis/wsdl/toJava JavaWriter.java
                        JavaUndeployWriter.java JavaTestCaseWriter.java
                        JavaStubWriter.java JavaSkelWriter.java
                        JavaServiceImplWriter.java JavaInterfaceWriter.java
                        JavaImplWriter.java JavaHolderWriter.java
                        JavaFaultWriter.java JavaEnumTypeWriter.java
                        JavaDeployWriter.java JavaComplexTypeWriter.java
                        Emitter.java
  Added:       java/src/org/apache/axis/wsdl/toJava GeneratedFileInfo.java
  Log:
  Enhance WSDL2Java provide more information on what exactly was generated.
  
  Added a routine to WSDL2Java class which returns an object (GeneratedFileInfo) which contains
a list of
  the files/classes generated and what their types are (e.g. stub, skeleton, interface, etc.).
  
  This object can be queried for a class name, file name, or entries of a particular type.
  
  This list is used instead of seperate class/filename lists to prevent duplicates.
  
  Revision  Changes    Path
  1.4       +32 -0     xml-axis/java/src/org/apache/axis/wsdl/WSDL2Java.java
  
  Index: WSDL2Java.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/WSDL2Java.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WSDL2Java.java	19 Dec 2001 14:57:41 -0000	1.3
  +++ WSDL2Java.java	10 Jan 2002 20:08:51 -0000	1.4
  @@ -63,6 +63,7 @@
   
   import org.apache.axis.wsdl.toJava.Emitter;
   import org.apache.axis.wsdl.toJava.JavaWriterFactory;
  +import org.apache.axis.wsdl.toJava.GeneratedFileInfo;
   
   import org.w3c.dom.Document;
   
  @@ -292,6 +293,37 @@
       //
       ///////////////////////////////////////////////////
   
  +    /**
  +     * Returns an object which contains of information on all generated files
  +     * including the class name, filename and a type string.
  +     * 
  +     * @return A org.apache.axis.wsdl.toJava.GeneratedFileInfo object
  +     * @see org.apache.axis.wsdl.toJava.GeneratedFileInfo
  +     */ 
  +    public GeneratedFileInfo getGeneratedFileInfo()
  +    {
  +        return emitter.getGeneratedFileInfo();
  +    }
  +
  +    /**
  +     * Return a list of all generated class names.
  +     * 
  +     * @return list of class names (strings)
  +     */
  +    public List getGeneratedClassNames() {
  +        return emitter.getGeneratedClassNames();
  +    }
  +
  +    /**
  +     * Return a list of all generated file names.
  +     * 
  +     * @return list of relative path names (strings)
  +     */
  +    public List getGeneratedFileNames() {
  +        return emitter.getGeneratedFileNames();
  +    }
  +
  +    
       /**
        * Call this method if you have a uri for the WSDL document
        * @param String wsdlURI the location of the WSDL file.
  
  
  
  1.4       +10 -6     xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriter.java
  
  Index: JavaWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JavaWriter.java	31 Dec 2001 18:31:41 -0000	1.3
  +++ JavaWriter.java	10 Jan 2002 20:08:51 -0000	1.4
  @@ -99,6 +99,7 @@
       protected String      packageName;
       protected PrintWriter pw;
       protected String      message;
  +    protected String      type;
   
       /**
        * Constructor.  Use this one to pass in a Type.  Type contains QName and java name.
  @@ -108,7 +109,8 @@
               SymTabEntry entry,
               String suffix,
               String extension,
  -            String message) {
  +            String message, 
  +            String type) {
           this.emitter     = emitter;
           this.qname       = entry.getQName();
           this.namespaces  = emitter.getNamespaces();
  @@ -117,6 +119,7 @@
           this.fileName    = className + '.' + extension;
           this.packageName = Utils.getJavaPackageName(entry.getName());
           this.message     = message;
  +        this.type        = type;
       } // ctor
   
   
  @@ -128,7 +131,8 @@
               QName qname,
               String suffix,
               String extension,
  -            String message) {
  +            String message, 
  +            String type) {
           this.emitter     = emitter;
           this.qname       = qname;
           this.namespaces  = emitter.getNamespaces();
  @@ -136,6 +140,7 @@
           this.fileName    = className + '.' + extension;
           this.packageName = namespaces.getCreate(qname.getNamespaceURI());
           this.message     = message;
  +        this.type        = type;
       } // ctor
   
       /**
  @@ -147,15 +152,14 @@
           String fqClass = packageName + "." + className;
           
           // Check for duplicates, probably the result of namespace mapping
  -        if (emitter.classList.contains(fqClass)) {
  +        if (emitter.fileInfo.getClassNames().contains(fqClass)) {
               throw new IOException(JavaUtils.getMessage("duplicateClass00", fqClass));
           }
  -        if (emitter.fileList.contains(path)) {
  +        if (emitter.fileInfo.getFileNames().contains(path)) {
               throw new IOException(JavaUtils.getMessage("duplicateFile00", path));
           }
           
  -        emitter.fileList.add(path);
  -        emitter.classList.add(fqClass);
  +        emitter.fileInfo.add(path, fqClass, type);
           namespaces.mkdir(packageName);
           File file = new File(packageDirName, fileName);
           if (emitter.bVerbose) {
  
  
  
  1.2       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaUndeployWriter.java
  
  Index: JavaUndeployWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaUndeployWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaUndeployWriter.java	11 Dec 2001 15:08:47 -0000	1.1
  +++ JavaUndeployWriter.java	10 Jan 2002 20:08:51 -0000	1.2
  @@ -82,7 +82,7 @@
                   new QName(definition.getTargetNamespace(), "undeploy"),
                   "",
                   "wsdd",
  -                JavaUtils.getMessage("genUndeploy00"));
  +                JavaUtils.getMessage("genUndeploy00"), "undeploy");
           this.definition = definition;
           this.symbolTable = symbolTable;
       } // ctor
  
  
  
  1.7       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java
  
  Index: JavaTestCaseWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JavaTestCaseWriter.java	20 Dec 2001 17:50:14 -0000	1.6
  +++ JavaTestCaseWriter.java	10 Jan 2002 20:08:51 -0000	1.7
  @@ -85,7 +85,7 @@
               ServiceEntry sEntry,
               SymbolTable symbolTable) {
           super(emitter, sEntry, "TestCase", "java",
  -                JavaUtils.getMessage("genTest00"));
  +                JavaUtils.getMessage("genTest00"), "testCase");
           this.service = sEntry.getService();
           this.symbolTable = symbolTable;
       } // ctor
  
  
  
  1.12      +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
  
  Index: JavaStubWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JavaStubWriter.java	10 Jan 2002 19:12:08 -0000	1.11
  +++ JavaStubWriter.java	10 Jan 2002 20:08:51 -0000	1.12
  @@ -98,7 +98,7 @@
               BindingEntry bEntry,
               SymbolTable symbolTable) {
           super(emitter, bEntry, "Stub", "java",
  -                JavaUtils.getMessage("genStub00"));
  +                JavaUtils.getMessage("genStub00"), "stub");
           this.bEntry = bEntry;
           this.binding = bEntry.getBinding();
           this.symbolTable = symbolTable;
  
  
  
  1.5       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java
  
  Index: JavaSkelWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JavaSkelWriter.java	10 Jan 2002 19:12:08 -0000	1.4
  +++ JavaSkelWriter.java	10 Jan 2002 20:08:51 -0000	1.5
  @@ -87,7 +87,7 @@
               BindingEntry bEntry,
               SymbolTable symbolTable) {
           super(emitter, bEntry, "Skeleton", "java",
  -                JavaUtils.getMessage("genSkel00"));
  +                JavaUtils.getMessage("genSkel00"), "skeleton");
           this.bEntry = bEntry;
           this.binding = bEntry.getBinding();
           this.symbolTable = symbolTable;
  
  
  
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java
  
  Index: JavaServiceImplWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaServiceImplWriter.java	9 Jan 2002 14:08:38 -0000	1.2
  +++ JavaServiceImplWriter.java	10 Jan 2002 20:08:51 -0000	1.3
  @@ -87,7 +87,7 @@
               ServiceEntry sEntry,
               SymbolTable symbolTable) {
           super(emitter, sEntry, "", "java",
  -                JavaUtils.getMessage("genService00"));
  +                JavaUtils.getMessage("genService00"), "service");
           this.service = sEntry.getService();
           this.symbolTable = symbolTable;
       } // ctor
  
  
  
  1.2       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaInterfaceWriter.java
  
  Index: JavaInterfaceWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaInterfaceWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaInterfaceWriter.java	11 Dec 2001 15:08:47 -0000	1.1
  +++ JavaInterfaceWriter.java	10 Jan 2002 20:08:51 -0000	1.2
  @@ -80,7 +80,7 @@
       protected JavaInterfaceWriter(
               Emitter emitter,
               PortTypeEntry ptEntry, SymbolTable symbolTable) {
  -        super(emitter, ptEntry, "", "java", JavaUtils.getMessage("genIface00"));
  +        super(emitter, ptEntry, "", "java", JavaUtils.getMessage("genIface00"), "interface");
           this.ptEntry = ptEntry;
           this.portType = ptEntry.getPortType();
           this.symbolTable = symbolTable;
  
  
  
  1.4       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaImplWriter.java
  
  Index: JavaImplWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaImplWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JavaImplWriter.java	20 Dec 2001 17:50:14 -0000	1.3
  +++ JavaImplWriter.java	10 Jan 2002 20:08:51 -0000	1.4
  @@ -98,7 +98,7 @@
               BindingEntry bEntry,
               SymbolTable symbolTable) {
           super(emitter, bEntry, "Impl", "java",
  -                JavaUtils.getMessage("genImpl00"));
  +                JavaUtils.getMessage("genImpl00"), "skeletonImpl");
           this.binding = bEntry.getBinding();
           this.symbolTable = symbolTable;
           this.bEntry = bEntry;
  
  
  
  1.5       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaHolderWriter.java
  
  Index: JavaHolderWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaHolderWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JavaHolderWriter.java	13 Dec 2001 19:07:39 -0000	1.4
  +++ JavaHolderWriter.java	10 Jan 2002 20:08:51 -0000	1.5
  @@ -77,7 +77,7 @@
                           Utils.xmlNameToJavaClass(type.getQName().getLocalPart())),
                   "Holder",
                   "java",
  -                JavaUtils.getMessage("genHolder00"));
  +                JavaUtils.getMessage("genHolder00"), "holder");
           this.type = type;
       } // ctor
   
  
  
  
  1.3       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaFaultWriter.java
  
  Index: JavaFaultWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaFaultWriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JavaFaultWriter.java	13 Dec 2001 17:33:17 -0000	1.2
  +++ JavaFaultWriter.java	10 Jan 2002 20:08:51 -0000	1.3
  @@ -75,7 +75,7 @@
        * Constructor.
        */
       protected JavaFaultWriter(Emitter emitter, QName qname, Fault fault, SymbolTable symbolTable)
{
  -        super(emitter, qname, "", "java", JavaUtils.getMessage("genFault00"));
  +        super(emitter, qname, "", "java", JavaUtils.getMessage("genFault00"), "fault");
           this.fault = fault;
           this.symbolTable = symbolTable;
       } // ctor
  
  
  
  1.5       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaEnumTypeWriter.java
  
  Index: JavaEnumTypeWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaEnumTypeWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JavaEnumTypeWriter.java	19 Dec 2001 21:08:22 -0000	1.4
  +++ JavaEnumTypeWriter.java	10 Jan 2002 20:08:51 -0000	1.5
  @@ -76,7 +76,7 @@
               Emitter emitter,
               TypeEntry type, Vector elements) {
           super(emitter, type, "", "java",
  -                JavaUtils.getMessage("genType00"));
  +                JavaUtils.getMessage("genType00"), "enumType");
           this.type = type;
           this.elements = elements;
       } // ctor
  
  
  
  1.6       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java
  
  Index: JavaDeployWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JavaDeployWriter.java	31 Dec 2001 18:31:41 -0000	1.5
  +++ JavaDeployWriter.java	10 Jan 2002 20:08:51 -0000	1.6
  @@ -86,7 +86,7 @@
                   new QName(definition.getTargetNamespace(), "deploy"),
                   "",
                   "wsdd",
  -                JavaUtils.getMessage("genDeploy00"));
  +                JavaUtils.getMessage("genDeploy00"), "deploy");
           this.definition = definition;
           this.symbolTable = symbolTable;
       } // ctor
  
  
  
  1.5       +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaComplexTypeWriter.java
  
  Index: JavaComplexTypeWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaComplexTypeWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JavaComplexTypeWriter.java	22 Dec 2001 04:38:14 -0000	1.4
  +++ JavaComplexTypeWriter.java	10 Jan 2002 20:08:51 -0000	1.5
  @@ -83,7 +83,7 @@
               Emitter emitter,
               TypeEntry type, Vector elements, TypeEntry extendType) {
           super(emitter, type, "", "java",
  -                JavaUtils.getMessage("genType00"));
  +                JavaUtils.getMessage("genType00"), "complexType");
           this.type = type;
           this.elements = elements;
           this.extendType = extendType;
  
  
  
  1.5       +11 -4     xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Emitter.java	19 Dec 2001 14:57:41 -0000	1.4
  +++ Emitter.java	10 Jan 2002 20:08:51 -0000	1.5
  @@ -110,8 +110,7 @@
       protected String outputDir = null;
       protected String packageName = null;
       protected byte scope = NO_EXPLICIT_SCOPE;
  -    protected ArrayList classList = new ArrayList();
  -    protected ArrayList fileList = new ArrayList();
  +    protected GeneratedFileInfo fileInfo = new GeneratedFileInfo(); 
       protected Namespaces namespaces = null;
       protected HashMap delaySetMap = null;
       protected WriterFactory writerFactory = null;
  @@ -378,16 +377,24 @@
        * This method returns a list of all generated class names.
        */
       public List getGeneratedClassNames() {
  -        return this.classList;
  +        return this.fileInfo.getClassNames();
       }
   
       /**
        * This method returns a list of all generated file names.
        */
       public List getGeneratedFileNames() {
  -        return this.fileList;
  +        return this.fileInfo.getFileNames();
       }
   
  +    /**
  +     * This method returns an object which contains of all generated files
  +     * including the class name, filename and a type string.
  +     */ 
  +    public GeneratedFileInfo getGeneratedFileInfo() {
  +        return this.fileInfo;
  +    }
  +    
       //////////////////////////////
       //
       // Methods using types (non WSDL)
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/wsdl/toJava/GeneratedFileInfo.java
  
  Index: GeneratedFileInfo.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.axis.wsdl.toJava;
  
  import java.util.ArrayList;
  import java.util.Iterator;
  import java.util.List;
  
  /**
   * File info available after emit to describe what
   * exactly was created by the Emitter.
   * 
   * 
   * @author Tom Jordahl (tomj@macromedia.com)
   */
  public class GeneratedFileInfo {
  
      protected ArrayList list = new ArrayList();
  
      /**
       * Structure to hold entries.
       * There are three public data members:
       * <ul>
       * <li><code>fileName</code> - A relative path of the generated file.</li>
       * <li><code>className</code> - The name of the class in the file.</li>
       * <li><code>type</code> - The type of the file.<br>
       * Valid types are:<br>
       *  <code>
       * stub, interface, complexType, enumType, fault, holder, skeleton, 
       *  skeletonImpl, service, deploy, undeploy, testCase
       * </code></li>
       * </ul> 
       * 
       * 
       */
      public class Entry {
          // relative path of the emitted file
          public String fileName;
          // name of emitted class
          public String className;
          // function of the emitted class
          public String type;
          
          public Entry(String name, String className, String type) {
              this.fileName = name;
              this.className = className;
              this.type = type;
          }
  
          public String toString() {
              return "Name: " + fileName +
                      " Class: " + className +
                      " Type: " + type;
          }
  
  
      } // Entry
  
  
      /**
       * Construct an empty file info list.
       */
      public GeneratedFileInfo() {
      }
  
      /**
       * Return the entire list of generated files
       */
      public List getList() {
          return list;
      }
  
      /**
       * Add an entry
       */
      public void add(String name, String className, String type) {
          list.add(new Entry(name, className, type));
      }
  
      /**
       * Lookup an entry by type.
       * <br>
       * Valid type values are:
       *  stub, interface, complexType, enumType, fault, holder, skeleton, 
       *  skeletonImpl, service, deploy, undeploy, testCase
       * 
       * @param type of objects you want info about
       * @return A list of <code>org.apache.axis.wsdl.toJava.GeneratedFileInfo.Entry</code>
objects.  Null if no objects found. 
       */
      public List findType(String type) {
          // look at each entry for the type we want
          ArrayList ret = null;
          for (Iterator i = list.iterator(); i.hasNext();) {
              Entry e = (Entry) i.next();
              if (e.type.equals(type)) {
                  if (ret == null)
                      ret = new ArrayList();
                  ret.add(e);
              }
          }
          return ret;
      }
  
      /**
       * Lookup an entry by file name
       * 
       * @param file name you want info about
       * @return The entry for the file name specified.  Null if not found
       */
      public Entry findName(String fileName) {
          // look at each entry for the type we want
          for (Iterator i = list.iterator(); i.hasNext();) {
              Entry e = (Entry) i.next();
              if (e.fileName.equals(fileName)) {
                  return e;
              }
          }
          return null;
      }
  
      /**
       * Lookup an entry by class name
       * 
       * @param class name you want info about
       * @return The entry for the class specified.  Null if not found
       */
      public Entry findClass(String className) {
          // look at each entry for the type we want
          for (Iterator i = list.iterator(); i.hasNext();) {
              Entry e = (Entry) i.next();
              if (e.className.equals(className)) {
                  return e;
              }
          }
          return null;
      }
  
      /**
       * Get the list of generated classes
       */
      public List getClassNames() {
          // is there a better way to do this?
          ArrayList ret = new ArrayList(list.size());
          for (Iterator i = list.iterator(); i.hasNext();) {
              Entry e = (Entry) i.next();
              ret.add(e.className);
          }
          return ret;
      }
  
      /**
       * Get the list of generated filenames
       */
      public List getFileNames() {
          // is there a better way to do this?
          ArrayList ret = new ArrayList(list.size());
          for (Iterator i = list.iterator(); i.hasNext();) {
              Entry e = (Entry) i.next();
              ret.add(e.fileName);
          }
          return ret;
      }
  
      /**
       * Convert all entries in the list to a string
       */
      public String toString() {
          String s = "";
          for (Iterator i = list.iterator(); i.hasNext();) {
              Entry entry = (Entry) i.next();
              s += entry.toString() + "\n";
          }
          return s;
      }
  }
  
  
  

Mime
View raw message