@@ -429,7 +429,7 @@ def printHeader():
429429
430430 def printClassMethods (spec , c ):
431431 print
432- print " public static class %s {" % (java_class_name (c .name ))
432+ print " public final static class %s {" % (java_class_name (c .name ))
433433 for m in c .allMethods ():
434434
435435 def getters ():
@@ -503,7 +503,7 @@ def write_arguments():
503503
504504 #start
505505 print
506- print " public static class %s" % (java_class_name (m .name ),)
506+ print " public final static class %s" % (java_class_name (m .name ),)
507507 print " extends Method"
508508 print " implements com.rabbitmq.client.AMQP.%s.%s" % (java_class_name (c .name ), java_class_name (m .name ))
509509 print " {"
@@ -541,7 +541,7 @@ def printMethodVisitor():
541541
542542 def printGetProtocolMethodNameMethod ():
543543 print
544- print " public static String getProtocolMethodName(int classId, int methodId) {"
544+ print " public final static String getProtocolMethodName(int classId, int methodId) {"
545545 print " Class<? extends Method> clazz = getMethodClass(classId, methodId);"
546546 print " if (clazz != null) {"
547547 print " try {"
@@ -554,7 +554,7 @@ def printGetProtocolMethodNameMethod():
554554
555555 def printGetMethodClassMethod ():
556556 print
557- print " private static Class<? extends Method> getMethodClass(int classId, int methodId) {"
557+ print " private final static Class<? extends Method> getMethodClass(int classId, int methodId) {"
558558 print " switch (classId) {"
559559 for c in spec .allClasses ():
560560 print " case %s:" % (c .index )
@@ -573,7 +573,7 @@ def printGetMethodClassMethod():
573573
574574 def printMethodArgumentReader ():
575575 print
576- print " public static Method readMethodFrom(DataInputStream in) throws IOException {"
576+ print " public final static Method readMethodFrom(DataInputStream in) throws IOException {"
577577 print " int classId = in.readShort();"
578578 print " int methodId = in.readShort();"
579579 print " Class<? extends Method> clazz = getMethodClass(classId, methodId);"
@@ -588,7 +588,7 @@ def printMethodArgumentReader():
588588
589589 def printContentHeaderReader ():
590590 print
591- print " public static AMQContentHeader readContentHeaderFrom(DataInputStream in) throws IOException {"
591+ print " public final static AMQContentHeader readContentHeaderFrom(DataInputStream in) throws IOException {"
592592 print " int classId = in.readShort();"
593593 print " switch (classId) {"
594594 for c in spec .allClasses ():
@@ -602,7 +602,7 @@ def printContentHeaderReader():
602602
603603 printHeader ()
604604 print
605- print "public class AMQImpl implements AMQP {"
605+ print "public final class AMQImpl implements AMQP {"
606606
607607 for c in spec .allClasses (): printClassMethods (spec ,c )
608608
0 commit comments