Author: tabish
Date: Thu Dec 17 15:32:58 2009
New Revision: 891769
URL: http://svn.apache.org/viewvc?rev=891769&view=rev
Log:
Further refine the output of ToString.
Modified:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ.Openwire.Generator/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.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=891769&r1=891768&r2=891769&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 Dec 17 15:32:58 2009
@@ -210,17 +210,24 @@
out.println(" return GetType().Name + \"[ \" + ");
if( getBaseClassName().equals( "BaseCommand" ) ) {
- out.println(" \"commandId = \" + this.CommandId +
\" \" + " );
- out.println(" \"responseRequired = \" +
this.ResponseRequired + \" \" + " );
+ out.println(" \"commandId = \" + this.CommandId +
\", \" + " );
+ out.println(" \"responseRequired = \" +
this.ResponseRequired + \", \" + " );
}
+ int size = getProperties().size();
+ int count = 0;
+
for( JProperty property : getProperties() ) {
String name = property.getSimpleName();
- out.println(" \"" + name + " = \" + " + name + " +
\" \" + " );
+ out.print(" \"" + name + " = \" + " + name + " + ");
+
+ if( ++count != size ) {
+ out.println("\", \" + ");
+ }
}
- out.println(" \"]\";");
+ out.println("\" ]\";");
}
protected void generateCloneBody( PrintWriter out ) {