VirtualBox

Changeset 21899 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jul 30, 2009 5:27:37 PM (15 years ago)
Author:
vboxsync
Message:

JAX-WS glue: fixed wrapper glitch, docs updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/webservice/glue-jaxws.xsl

    r21898 r21899  
    112112         <xsl:value-of select="concat($G_virtualBoxPackage, concat('.', $name))" />
    113113      </xsl:when>
    114      <xsl:when test="//interface[@name=$name]/@wsmap='struct' or //interface[@name=$origname]/@wsmap='struct'">
    115         <xsl:value-of select="concat($G_virtualBoxPackage2,  concat('.', $name))" />
    116      </xsl:when>
    117114     <xsl:when test="//interface[@name=$name]">
    118115       <xsl:value-of select="concat($G_virtualBoxPackage2,  concat('.', $name))" />
     
    178175  <xsl:param name="type" />
    179176  <xsl:param name="safearray" />
    180 
    181   <xsl:if test="$safearray">
     177  <xsl:param name="forceelem" />
     178 
     179  <xsl:variable name="needarray" select="($safearray='yes') and not($forceelem='yes')" />
     180
     181  <xsl:if test="$needarray">
    182182    <xsl:value-of select="'List&lt;'" />
    183183  </xsl:if>
     
    202202    </xsl:otherwise>
    203203  </xsl:choose>
    204   <xsl:if test="$safearray">
     204  <xsl:if test="$needarray">
    205205    <xsl:value-of select="'&gt;'" />
    206206  </xsl:if>
     
    251251          <xsl:choose>
    252252            <xsl:when test="$isstruct">
    253               <xsl:value-of select="concat('Helper.wrap2(',$elemtype, '.class, port, ', $value,')')"/>
     253              <xsl:variable name="javagettertype">
     254                <xsl:call-template name="typeIdl2Java">
     255                  <xsl:with-param name="method" select="$methodname" />
     256                  <xsl:with-param name="name" select="$value" />
     257                  <xsl:with-param name="type" select="$idltype" />
     258                  <xsl:with-param name="safearray" select="$safearray" />
     259                  <xsl:with-param name="forceelem" select="'yes'" />
     260                </xsl:call-template>
     261              </xsl:variable>
     262              <xsl:value-of select="concat('Helper.wrap2(',$elemtype, '.class, ', $javagettertype, '.class, port, ', $value,')')"/>
    254263            </xsl:when>
    255264            <xsl:otherwise>
     
    519528    }
    520529
    521 
    522     public static <T, T1> List<T> wrap2(Class<T> wrapperClass, VboxPortType pt, List<T1> thisPtrs) {
     530    public static <T1, T2> List<T1> wrap2(Class<T1> wrapperClass1, Class<T2> wrapperClass2, VboxPortType pt, List<T2> thisPtrs) {
    523531        try {
    524532            if(thisPtrs==null)  return Collections.emptyList();
    525533
    526             Constructor<T> c = wrapperClass.getConstructor(String.class, VboxPortType.class);
    527             List<T> ret = new ArrayList<T>(thisPtrs.size());
    528             for (T1 thisPtr : thisPtrs) {
     534            Constructor<T1> c = wrapperClass1.getConstructor(wrapperClass2, VboxPortType.class);
     535            List<T1> ret = new ArrayList<T1>(thisPtrs.size());
     536            for (T2 thisPtr : thisPtrs) {
    529537                ret.add(c.newInstance(thisPtr,pt));
    530538            }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette