This is an automated email from the ASF dual-hosted git repository. dfoulks pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/activemq-nms-openwire-generator.git
commit 2ad3b98f42458ffa18718e017c6eb7ff3dcaf07c Author: Timothy A. Bish <[email protected]> AuthorDate: Thu Dec 17 15:32:58 2009 +0000 Further refine the output of ToString. --- .../nms/openwire/tool/commands/CommandClassGenerator.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java b/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java index a768d95..22bd357 100644 --- a/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java +++ b/src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandClassGenerator.java @@ -210,17 +210,24 @@ public class CommandClassGenerator extends CommandCodeGenerator { 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 ) {
