This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Problem defining a class implementing an interface nested in a class
- From: "Tom Briscoe" <tbriscoe at nrao dot edu>
- To: "Moritz Heidkamp" <moritz-kawa at twoticketsplease dot de>
- Cc: kawa at sourceware dot org
- Date: Sun, 27 Feb 2011 16:30:03 -0700
- Subject: Re: Problem defining a class implementing an interface nested in a class
- References: <87zkphce1k.fsf@twoticketsplease.de>
- Reply-to: tbriscoe at nrao dot edu
Moritz,
Try naming the class (in Kawa) as
javax.swing.text.AbstractDocument$Content. The names of nested
subclasses/interfaces are separated from the outer class by a $ when the
class is compiled. This is also required when you instantiate, for
instance, java.awt.geom.Ellipse2D.Double (in Java) as
java.awt.geom.Ellipse2D$Double in Kawa.
Cheers,
Tom Briscoe
> Dear Kawaites,
>
> I tried dabbling with Kawa a bit this weekend and have to say that I
> quite like it so far except for the JVM overhead -- but being able to
> use a Scheme when forced to use the JVM makes up for that more than
> enough. So tanks a lot for Kawa and keep up the great work :-)
>
> During my experiments I stumbled upon something which may either be
> caused by a bug or by me being dumb. It seems I can't define a class
> implementing an interface that's nested inside another class
> e.g. javax.swing.text.AbstractDocument.Content. Oddly, I get this
> exception: java.lang.RuntimeException: no such class:
> javax.swing.text.AbstractDocument.Content -- looks like Kawa is sure
> that this must be a class. Implementing something like
> java.lang.Comparable works as advertised though.
>
> Any hints?
>
> Note that I am not (yet) subscribed to the list so please reply widely.
>
> Thanks in advance,
> Moritz
>