You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/07/30 20:52:53 UTC

svn commit: r799403 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java

Author: tabish
Date: Thu Jul 30 18:52:53 2009
New Revision: 799403

URL: http://svn.apache.org/viewvc?rev=799403&view=rev
Log:
Cleans up the generated code a bit to match the existing coding conventions.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java?rev=799403&r1=799402&r2=799403&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/marshalers/AmqCSharpMarshallersGenerator.java Thu Jul 30 18:52:53 2009
@@ -111,27 +111,6 @@
         return answer;
     }
 
-//    public boolean isMarshallAware(JClass j) {
-//
-//        String answer = jclass.getSimpleName();
-//
-//        if( answer.equals("ActiveMQTextMessage") ) {
-//            return true;
-//        } else if( answer.equals("ActiveMQBytesMessage") ) {
-//            return true;
-//        } else if( answer.equals("ActiveMQMapMessage") ) {
-//            return true;
-//        } else if( answer.equals("ActiveMQObjectMessage") ) {
-//            return true;
-//        } else if( answer.equals("ActiveMQStreamMessage") ) {
-//            return true;
-//        } else if( answer.equals("ActiveMBlobMessage") ) {
-//            return true;
-//        } else {
-//            return super.isMarshallAware(jclass);
-//        }
-//    }
-
     protected String getFilePostFix() {
         return ".cs";
     }
@@ -190,21 +169,23 @@
         out.println("    {");
 
         if (!isAbstractClass()) {
-            out.println("");
+            out.println("        /// <summery>");
+            out.println("        ///  Creates an instance of the Object that this marshaller handles.");
+            out.println("        /// </summery>");
             out.println("        public override DataStructure CreateObject() ");
             out.println("        {");
             out.println("            return new " + jclass.getSimpleName() + "();");
             out.println("        }");
             out.println("");
+            out.println("        /// <summery>");
+            out.println("        ///  Returns the type code for the Object that this Marshaller handles..");
+            out.println("        /// </summery>");
             out.println("        public override byte GetDataStructureType() ");
             out.println("        {");
             out.println("            return " + jclass.getSimpleName() + ".ID_" + jclass.getSimpleName().toUpperCase() + ";");
             out.println("        }");
         }
 
-        /*
-         * Generate the tight encoding marshallers
-         */
         out.println("");
         out.println("        // ");
         out.println("        // Un-marshal an object instance from the data input stream");
@@ -277,7 +258,6 @@
         }
 
         out.println("        }");
-
         out.println("");
         out.println("        // ");
         out.println("        // Un-marshal an object instance from the data input stream");
@@ -331,6 +311,7 @@
             out.println("");
             out.println("            info.AfterMarshall(wireFormat);");
         }
+
         out.println("        }");
         out.println("    }");
         out.println("}");
@@ -382,6 +363,10 @@
         out.println("    /// </summary>");
         out.println("    public class MarshallerFactory : IMarshallerFactory");
         out.println("    {");
+        out.println("        /// <summery>");
+        out.println("        ///  Adds the Marshallers for this version of the OpenWire protocol to the ");
+        out.println("        ///  Collection of Marshallers stored in the OpenWireFormat class.");
+        out.println("        /// </summery>");
         out.println("        public void configure(OpenWireFormat format) ");
         out.println("        {");
         out.println("            format.clearMarshallers();");