javaclass

Changeset

111:83efe2ce143f
2005-01-10 Paul Boddie raw files shortlog changelog graph Moved the lang module contents into the lang package. Fixed various java.lang and java.io circular imports by introducing a java.lang._object module. Corrected various base classes (object -> java.lang.Object, Exception -> java.lang.Exception) and fixed raising of exceptions in certain cases.
java/text.py (file)
     1.1 --- a/java/text.py	Mon Jan 10 23:52:19 2005 +0100
     1.2 +++ b/java/text.py	Mon Jan 10 23:52:19 2005 +0100
     1.3 @@ -1,6 +1,8 @@
     1.4  #!/usr/bin/env python
     1.5  
     1.6 -class FilterOutputStream(object):
     1.7 +import java.lang
     1.8 +
     1.9 +class FilterOutputStream(java.lang.Object):
    1.10      def __init__(self, out):
    1.11          self.out = out
    1.12      def write(self, value, *args):
    1.13 @@ -14,7 +16,7 @@
    1.14      def close(self):
    1.15          self.out.close()
    1.16  
    1.17 -class InputStream(object):
    1.18 +class InputStream(java.lang.Object):
    1.19      def read(self, *args):
    1.20          raise NotImplementedError, "read"
    1.21      def skip(self, n):
    1.22 @@ -30,7 +32,7 @@
    1.23      def markSupported(self):
    1.24          raise NotImplementedError, "markSupported"
    1.25  
    1.26 -class MessageFormat(object):
    1.27 +class MessageFormat(java.lang.Object):
    1.28      def __init__(self, pattern):
    1.29          self.pattern = pattern
    1.30  
    1.31 @@ -63,7 +65,7 @@
    1.32      
    1.33  setattr(MessageFormat, "__init_____java__lang__String", MessageFormat.__init__)
    1.34  
    1.35 -class OutputStream(object):
    1.36 +class OutputStream(java.lang.Object):
    1.37      def write(self, b, *args):
    1.38          raise NotImplementedError, "write"
    1.39      def flush(self):