Skip to content
Permalink
Browse files
Further refine the output of ToString.
  • Loading branch information
Timothy A. Bish committed Dec 17, 2009
1 parent 33428d8 commit 2ad3b98f42458ffa18718e017c6eb7ff3dcaf07c
Showing 1 changed file with 11 additions and 4 deletions.
@@ -210,17 +210,24 @@ protected void generateToStringBody( PrintWriter out ) {
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 ) {

0 comments on commit 2ad3b98

Please sign in to comment.