Skip to content

Commit 2a258cb

Browse files
author
Steve Powell
committed
Whitespace changes.
1 parent 7e7087f commit 2a258cb

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

codegen.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def printClassInterfaces():
138138
print " %s %s();" % (java_field_type(spec, a.domain), java_getter_name(a.name))
139139
print " }"
140140
print " }"
141-
141+
142142
def printReadProperties(c):
143143
print
144144
print """ public void readPropertiesFrom(ContentHeaderPropertyReader reader)
@@ -150,7 +150,7 @@ def printReadProperties(c):
150150
for f in c.fields:
151151
print " this.%s = %s_present ? reader.read%s() : null;" % (java_field_name(f.name), java_field_name(f.name), java_class_name(f.domain))
152152
print " }"
153-
153+
154154
def printWriteProperties(c):
155155
print
156156
print """ public void writePropertiesTo(ContentHeaderPropertyWriter writer)
@@ -162,7 +162,7 @@ def printWriteProperties(c):
162162
for f in c.fields:
163163
print " if (this.%s != null) { writer.write%s(this.%s); } " % (java_field_name(f.name), java_class_name(f.domain), java_field_name(f.name))
164164
print " }"
165-
165+
166166
def printPropertyDebug(c):
167167
print
168168
print " public void appendPropertyDebugStringTo(StringBuffer acc) {"
@@ -175,7 +175,7 @@ def printPropertyDebug(c):
175175

176176
print " acc.append(\")\");"
177177
print " }"
178-
178+
179179
def printClassProperties(c):
180180
print
181181
print " public static class %(className)s extends %(parentClass)s {" % {'className' : java_class_name(c.name) + 'Properties', 'parentClass' : 'com.rabbitmq.client.impl.AMQ' + java_class_name(c.name) + 'Properties'}
@@ -191,7 +191,7 @@ def printClassProperties(c):
191191
sys.stdout.write( " %s %s" % (java_property_type(spec,f.domain),java_field_name(f.name)))
192192
if not index == len(c.fields) - 1:
193193
print ","
194-
194+
195195
print ")"
196196
print " {"
197197
for f in c.fields:
@@ -203,7 +203,7 @@ def printClassProperties(c):
203203
print " public %sProperties() {}" % (java_class_name(c.name))
204204
print " public int getClassId() { return %i; }" % (c.index)
205205
print " public java.lang.String getClassName() { return \"%s\"; }" % (c.name)
206-
206+
207207
#access functions
208208
print
209209
for f in c.fields:
@@ -310,15 +310,15 @@ def read_arguments():
310310
for a in m.arguments:
311311
print " this.%s = reader.read%s();" % (java_field_name(a.name), java_class_name(spec.resolveDomain(a.domain)))
312312
print " }"
313-
313+
314314
def write_arguments():
315315
print
316316
print " public void writeArgumentsTo(MethodArgumentWriter writer)"
317317
print " throws IOException"
318318
print " {"
319319
for a in m.arguments:
320320
print " writer.write%s(this.%s);" % (java_class_name(spec.resolveDomain(a.domain)), java_field_name(a.name))
321-
print " }"
321+
print " }"
322322

323323
#start
324324
print
@@ -339,6 +339,7 @@ def write_arguments():
339339
argument_debug_string()
340340
read_arguments()
341341
write_arguments()
342+
342343
print " }"
343344
print " }"
344345

@@ -357,7 +358,7 @@ def printMethodVisitor():
357358
for m in c.allMethods():
358359
print " public Object visit(%s.%s x) throws IOException { throw new UnexpectedMethodError(x); } " % (java_class_name(c.name), java_class_name(m.name))
359360
print " }"
360-
361+
361362
def printMethodArgumentReader():
362363
print
363364
print " public static Method readMethodFrom(DataInputStream in) throws IOException { "
@@ -380,7 +381,7 @@ def printMethodArgumentReader():
380381
print
381382
print " throw new UnknownClassOrMethodId(classId, methodId);"
382383
print " }"
383-
384+
384385
def printContentHeaderReader(c):
385386
print
386387
print """ public static AMQContentHeader readContentHeaderFrom(DataInputStream in)
@@ -397,14 +398,14 @@ def printContentHeaderReader(c):
397398
print
398399
print " throw new UnknownClassOrMethodId(classId, -1);"
399400
print " }"
400-
401+
401402
printHeader()
402403
for c in spec.allClasses(): printClassMethods(c)
403404
printMethodVisitor()
404405
printMethodArgumentReader()
405406
printContentHeaderReader(c)
406407
print "}"
407-
408+
408409
#--------------------------------------------------------------------------------
409410

410411
def generateJavaApi(specPath):

0 commit comments

Comments
 (0)