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 17:32:32 UTC
svn commit: r799333 - in
/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands:
CommandClassGenerator.java ConsumerIdGenerator.java ProducerIdGenerator.java
Author: tabish
Date: Thu Jul 30 15:32:31 2009
New Revision: 799333
URL: http://svn.apache.org/viewvc?rev=799333&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/commands/CommandClassGenerator.java
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java?rev=799333&r1=799332&r2=799333&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java Thu Jul 30 15:32:31 2009
@@ -55,11 +55,8 @@
generateProperties( out );
- out.println("");
-
generateConstructors(out);
- out.println("");
out.println(" ///");
out.println(" /// <summery>");
out.println(" /// Get the unique identifier that this object and its own");
@@ -155,7 +152,6 @@
}
out.println(" };");
- out.println("");
out.println("}");
out.println("");
}
@@ -187,12 +183,18 @@
protected void generateProperties( PrintWriter out ) {
+ if( getProperties().isEmpty() ) {
+ return;
+ }
+
for( JProperty property : getProperties() ) {
String type = toCSharpType(property.getType());
String name = decapitalize(property.getSimpleName());
out.println(" "+type+" "+name+";");
}
+
+ out.println("");
}
protected void generateVisitBody( PrintWriter out ) {
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java?rev=799333&r1=799332&r2=799333&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ConsumerIdGenerator.java Thu Jul 30 15:32:31 2009
@@ -22,10 +22,12 @@
protected void generateConstructors( PrintWriter out ) {
- out.println(" public "+getClassName()+"() {");
+ out.println(" public "+getClassName()+"()");
+ out.println(" {");
out.println(" }");
out.println("");
- out.println(" public "+getClassName()+"( SessionId sessionId, long consumerId ) {");
+ out.println(" public "+getClassName()+"( SessionId sessionId, long consumerId )");
+ out.println(" {");
out.println(" this.connectionId = sessionId.ConnectionId;");
out.println(" this.sessionId = sessionId.Value;");
out.println(" this.value = consumerId;");
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java?rev=799333&r1=799332&r2=799333&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/ProducerIdGenerator.java Thu Jul 30 15:32:31 2009
@@ -22,10 +22,12 @@
protected void generateConstructors( PrintWriter out ) {
- out.println(" public "+getClassName()+"() {");
+ out.println(" public "+getClassName()+"()");
+ out.println(" {");
out.println(" }");
out.println("");
- out.println(" public "+getClassName()+"( SessionId sessionId, long consumerId ) {");
+ out.println(" public "+getClassName()+"( SessionId sessionId, long consumerId )");
+ out.println(" {");
out.println(" this.connectionId = sessionId.ConnectionId;");
out.println(" this.sessionId = sessionId.Value;");
out.println(" this.value = consumerId;");