Skip to content
Permalink
Browse files
Cleans up the generated code a bit to match the existing coding conve…
…ntions.
  • Loading branch information
Timothy A. Bish committed Jul 30, 2009
1 parent 6fb6566 commit 80da5b3dcfddaef0450ab5dd9f1b877d540b290a
Showing 3 changed files with 14 additions and 8 deletions.
@@ -55,11 +55,8 @@ public void generate( PrintWriter out ) {

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 @@ public void generate( PrintWriter out ) {
}

out.println(" };");
out.println("");
out.println("}");
out.println("");
}
@@ -187,12 +183,18 @@ protected void generateConstructors( PrintWriter out ) {

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 ) {
@@ -22,10 +22,12 @@ public class ConsumerIdGenerator extends CommandClassGenerator {

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;");
@@ -22,10 +22,12 @@ public class ProducerIdGenerator extends CommandClassGenerator {

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;");

0 comments on commit 80da5b3

Please sign in to comment.