javaclass

Changeset

34:57e3ca070604
2004-11-11 Paul Boddie raw files shortlog changelog graph Fixed class hierarchy so that the appropriate classes use the appropriate get_python_name method.
classfile.py (file)
     1.1 --- a/classfile.py	Thu Nov 11 20:30:46 2004 +0100
     1.2 +++ b/classfile.py	Thu Nov 11 22:56:50 2004 +0100
     1.3 @@ -173,7 +173,7 @@
     1.4  class InterfaceMethodRefInfo(MethodRefInfo):
     1.5      pass
     1.6  
     1.7 -class NameAndTypeInfo(NameUtils, DescriptorUtils, PythonMethodUtils):
     1.8 +class NameAndTypeInfo(NameUtils, DescriptorUtils, PythonNameUtils):
     1.9      def init(self, data, class_file):
    1.10          self.class_file = class_file
    1.11          self.name_index = u2(data[0:2])
    1.12 @@ -237,7 +237,7 @@
    1.13  # Other information.
    1.14  # Objects of these classes are generally aware of the class they reside in.
    1.15  
    1.16 -class ItemInfo(NameUtils, DescriptorUtils, PythonMethodUtils):
    1.17 +class ItemInfo(NameUtils, DescriptorUtils):
    1.18      def init(self, data, class_file):
    1.19          self.class_file = class_file
    1.20          self.access_flags = u2(data[0:2])
    1.21 @@ -246,11 +246,11 @@
    1.22          self.attributes, data = self.class_file._get_attributes(data[6:])
    1.23          return data
    1.24  
    1.25 -class FieldInfo(ItemInfo):
    1.26 +class FieldInfo(ItemInfo, PythonNameUtils):
    1.27      def get_descriptor(self):
    1.28          return self._get_field_descriptor(unicode(self.class_file.constants[self.descriptor_index - 1]))
    1.29  
    1.30 -class MethodInfo(ItemInfo):
    1.31 +class MethodInfo(ItemInfo, PythonMethodUtils):
    1.32      def get_descriptor(self):
    1.33          return self._get_method_descriptor(unicode(self.class_file.constants[self.descriptor_index - 1]))
    1.34