gdaniels    02/03/29 15:25:45

  Modified:    java/src/org/apache/axis/description ParameterDesc.java
                        OperationDesc.java
  Log:
  Add constructors to allow quick initialization, and prune a little dead code.
  
  Revision  Changes    Path
  1.4       +16 -0     xml-axis/java/src/org/apache/axis/description/ParameterDesc.java
  
  Index: ParameterDesc.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/description/ParameterDesc.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ParameterDesc.java        25 Mar 2002 04:44:01 -0000      1.3
  +++ ParameterDesc.java        29 Mar 2002 23:25:45 -0000      1.4
  @@ -88,6 +88,22 @@
       /** The order of this parameter (-1 indicates unordered) */
       private int order = -1;
   
  +    public ParameterDesc() {
  +    }
  +
  +    /**
  +     * "Complete" constructor, suitable for usage in skeleton code
  +     *
  +     * @param name the parameter's fully qualified XML name
  +     * @param mode IN, OUT, INOUT
  +     * @param typeQName the parameter's XML type QName
  +     */
  +    public ParameterDesc(QName name, byte mode, QName typeQName) {
  +        this.name = name;
  +        this.mode = mode;
  +        this.typeQName = typeQName;
  +    }
  +
       public String toString() {
           return "(" + typeEntry + ", " + getName() + ", "
                   + (mode == IN ? "IN)" : mode == INOUT ? "INOUT)" : "OUT)");
  
  
  
  1.5       +22 -3     xml-axis/java/src/org/apache/axis/description/OperationDesc.java
  
  Index: OperationDesc.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/description/OperationDesc.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- OperationDesc.java        27 Mar 2002 17:53:06 -0000      1.4
  +++ OperationDesc.java        29 Mar 2002 23:25:45 -0000      1.5
  @@ -58,6 +58,7 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.lang.reflect.Method;
  +import java.lang.reflect.Array;
   
   /**
    * An OperationDesc is an abstract description of an operation on a service.
  @@ -90,9 +91,6 @@
       
       // FIXME : Just have a return ParamDesc???
   
  -    /** The Java method name this maps to (is this just name?) */
  -    private String methodName;
  -
       /** The actual Java method associated with this operation, if known */
       private Method method;
   
  @@ -109,6 +107,17 @@
       }
   
       /**
  +     * "Complete" constructor
  +     */
  +    public OperationDesc(String name, ParameterDesc [] parameters, QName 
returnQName) {
  +        this.name = name;
  +        this.returnQName = returnQName;
  +        for (int i = 0; i < parameters.length; i++) {
  +            this.parameters.add(parameters[i]);
  +        }
  +    }
  +
  +    /**
        * Return the operation's name
        */
       public String getName() {
  @@ -201,6 +210,16 @@
   
       public ArrayList getParameters() {
           return parameters;
  +    }
  +
  +    /**
  +     * Set the parameters wholesale.  Can only be called from within this
  +     * package (by ServiceDesc)
  +     *
  +     * @param parameters an ArrayList of ParameterDescs
  +     */
  +    void setParameters(ArrayList parameters) {
  +        this.parameters = parameters;
       }
   
       public int getNumInParams() {
  
  
  


Reply via email to