Per Bothner wrote:
> Jeroen Frijters wrote:
> 
> > That's why I'm very much in favor of using RawData.  ...
> > 
> > public abstract class RawData {}
> > 
> > public final class RawData32 extends RawData
> > {
> >   private int pointer;
> > }
> > 
> > public final class RawData64 extends RawData
> > {
> >   private long pointer;
> > }
> > 
> > All the Java code would ever see are RawData references, but the JNI
> > layer knows that all RawData references are actually 32 or 
> 64 bit (or
> > whatever that platform requires).
> 
> But this is a completely different model than the CNI RawData,
> since you're adding an extra layer of indirection.

No. In CNI you would continue to use RawData as the pointer. I'm doing
the same in my VM. The subclassing is only for JNI.

Regards,
Jeroen


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to