oltu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1481712 - /oltu/whiteboard/simonetripodi/oltu-commons/src/main/stylesheet/commons.xsl
Date Mon, 13 May 2013 07:02:45 GMT
Author: simonetripodi
Date: Mon May 13 07:02:44 2013
New Revision: 1481712

URL: http://svn.apache.org/r1481712
Log:
included static parameters name constants

Modified:
    oltu/whiteboard/simonetripodi/oltu-commons/src/main/stylesheet/commons.xsl

Modified: oltu/whiteboard/simonetripodi/oltu-commons/src/main/stylesheet/commons.xsl
URL: http://svn.apache.org/viewvc/oltu/whiteboard/simonetripodi/oltu-commons/src/main/stylesheet/commons.xsl?rev=1481712&r1=1481711&r2=1481712&view=diff
==============================================================================
--- oltu/whiteboard/simonetripodi/oltu-commons/src/main/stylesheet/commons.xsl (original)
+++ oltu/whiteboard/simonetripodi/oltu-commons/src/main/stylesheet/commons.xsl Mon May 13
07:02:44 2013
@@ -50,6 +50,7 @@ package org.apache.oltu.commons;
 public final class <xsl:value-of select="@name" />
     extends BaseMessage
 {
+    <xsl:apply-templates select="parameter" mode="staticField" />
     <xsl:apply-templates select="parameter" mode="field" />
     private <xsl:value-of select="@name" />(<xsl:apply-templates select="parameter"
mode="ctorArg" />)
     {<xsl:apply-templates select="parameter" mode="ctorArgSetting" />
@@ -75,6 +76,13 @@ public final class <xsl:value-of select=
 }
 </xsl:template>
 
+  <xsl:template match="parameter" mode="staticField">
+    /**
+     * The {@code <xsl:value-of select="@name" />} constant.
+     */
+    private static final String <xsl:value-of select="translate(@name, $lcletters, $ucletters)"
/> = "<xsl:value-of select="@name" />";
+</xsl:template>
+
   <xsl:template match="parameter" mode="field">
     /**
      * The {@code <xsl:value-of select="@name" />} parameter.
@@ -90,7 +98,7 @@ public final class <xsl:value-of select=
     {
         return <xsl:value-of select="@field" />;
     }
-  </xsl:template>
+</xsl:template>
 
   <xsl:template match="parameter" mode="ctorArg">
     <xsl:if test="position() &gt; 1">, </xsl:if><xsl:value-of select="@type"
/><xsl:text> </xsl:text><xsl:value-of select="@field" />



Mime
View raw message