This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: consumption


John Kozak wrote:

>I'm trying to do some XML parsing using kawa, and implementing a
>Consumer seemed a reasonable thing to do.  So I wrote the code below,
>but it doesn't compile.  Is there perhaps a problem with arrays of
>non-Object type?  Error is "method write(char[],int,int)void not implemented".
>
This patch should fix it.


Index: ArrayType.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/bytecode/ArrayType.java,v
retrieving revision 1.13
diff -u -r1.13 ArrayType.java
--- ArrayType.java	2000/10/09 18:55:04	1.13
+++ ArrayType.java	2001/11/05 07:33:45
@@ -19,6 +19,14 @@
     this.elements = elements;
   }
 
+  public Type getImplementationType()
+  {
+    Type etype = elements.getImplementationType();
+    if (elements == etype)
+      return this;
+    return make(etype);
+  }
+
   /** Find or create an ArrayType for the specified element type. */
   public static ArrayType make(Type elements)
   {
@@ -47,5 +55,4 @@
     else
       return -3;
   }
-
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]