# HG changeset patch # User Paul Boddie # Date 1100210210 -3600 # Node ID 57e3ca07060458d3e8f4896c09a7c6d827be2cd7 # Parent ef53ab16c02e7a0f5baf23eef5952c9104b3c851 Fixed class hierarchy so that the appropriate classes use the appropriate get_python_name method. diff -r ef53ab16c02e -r 57e3ca070604 classfile.py --- a/classfile.py Thu Nov 11 20:30:46 2004 +0100 +++ b/classfile.py Thu Nov 11 22:56:50 2004 +0100 @@ -173,7 +173,7 @@ class InterfaceMethodRefInfo(MethodRefInfo): pass -class NameAndTypeInfo(NameUtils, DescriptorUtils, PythonMethodUtils): +class NameAndTypeInfo(NameUtils, DescriptorUtils, PythonNameUtils): def init(self, data, class_file): self.class_file = class_file self.name_index = u2(data[0:2]) @@ -237,7 +237,7 @@ # Other information. # Objects of these classes are generally aware of the class they reside in. -class ItemInfo(NameUtils, DescriptorUtils, PythonMethodUtils): +class ItemInfo(NameUtils, DescriptorUtils): def init(self, data, class_file): self.class_file = class_file self.access_flags = u2(data[0:2]) @@ -246,11 +246,11 @@ self.attributes, data = self.class_file._get_attributes(data[6:]) return data -class FieldInfo(ItemInfo): +class FieldInfo(ItemInfo, PythonNameUtils): def get_descriptor(self): return self._get_field_descriptor(unicode(self.class_file.constants[self.descriptor_index - 1])) -class MethodInfo(ItemInfo): +class MethodInfo(ItemInfo, PythonMethodUtils): def get_descriptor(self): return self._get_method_descriptor(unicode(self.class_file.constants[self.descriptor_index - 1]))