src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java
changeset 47359 e1a6c0168741
parent 47216 71c04702a3d5
child 48409 5ab69533994b
equal deleted inserted replaced
47358:d07d5f7cab35 47359:e1a6c0168741
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
       
     3  * @LastModified: Oct 2017
     3  */
     4  */
     4 /*
     5 /*
     5  * Licensed to the Apache Software Foundation (ASF) under one or more
     6  * Licensed to the Apache Software Foundation (ASF) under one or more
     6  * contributor license agreements.  See the NOTICE file distributed with
     7  * contributor license agreements.  See the NOTICE file distributed with
     7  * this work for additional information regarding copyright ownership.
     8  * this work for additional information regarding copyright ownership.
    28 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
    29 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
    29 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
    30 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
    30 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
    31 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
    31 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
    32 import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util;
    32 import com.sun.org.apache.xml.internal.utils.XML11Char;
    33 import com.sun.org.apache.xml.internal.utils.XML11Char;
    33 
    34 import java.util.List;
    34 import java.util.Vector;
       
    35 
    35 
    36 /**
    36 /**
    37  * @author Jacek Ambroziak
    37  * @author Jacek Ambroziak
    38  * @author Santiago Pericas-Geertsen
    38  * @author Santiago Pericas-Geertsen
    39  * @author Erwin Bolwidt <ejb@klomp.org>
    39  * @author Erwin Bolwidt <ejb@klomp.org>
   203      * the Param with a corresponding WithParam having the same name.
   203      * the Param with a corresponding WithParam having the same name.
   204      */
   204      */
   205     private void buildParameterList() {
   205     private void buildParameterList() {
   206         // Put the parameters from the called template into the array first.
   206         // Put the parameters from the called template into the array first.
   207         // This is to ensure the order of the parameters.
   207         // This is to ensure the order of the parameters.
   208         Vector<Param> defaultParams = _calleeTemplate.getParameters();
   208         List<Param> defaultParams = _calleeTemplate.getParameters();
   209         int numParams = defaultParams.size();
   209         int numParams = defaultParams.size();
   210         _parameters = new SyntaxTreeNode[numParams];
   210         _parameters = new SyntaxTreeNode[numParams];
   211         for (int i = 0; i < numParams; i++) {
   211         for (int i = 0; i < numParams; i++) {
   212             _parameters[i] = defaultParams.elementAt(i);
   212             _parameters[i] = defaultParams.get(i);
   213         }
   213         }
   214 
   214 
   215         // Replace a Param with a WithParam if they have the same name.
   215         // Replace a Param with a WithParam if they have the same name.
   216         int count = elementCount();
   216         int count = elementCount();
   217         for (int i = 0; i < count; i++) {
   217         for (int i = 0; i < count; i++) {