This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: consumption
- To: John Kozak <jk at noontide dot demon dot co dot uk>
- Subject: Re: consumption
- From: Per Bothner <per at bothner dot com>
- Date: Sun, 04 Nov 2001 23:35:23 -0800
- CC: kawa at sources dot redhat dot com
- References: <15333.21245.734000.884012@thameslighter.net>
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;
}
-
}