Subj : Re: Integrating Java Maps in Rhino To : netscape.public.mozilla.jseng From : Attila Szegedi Date : Mon May 16 2005 01:07 pm Yeah, it's the way it goes. I also implemented a "NativeMapAdapter extends NativeJavaObject" and "NativeListAdapter extends NativeJavaObject" in the environment I'm developing. (Note -- I didn't do a clean implementation from Scriptable, so my lists still support size etc. methods) Attila. On Sat, 14 May 2005 23:07:30 +0200, Rod Macpherson wrote: > > I started off wading through NativeJavaObject which as you know is a > full-on reflection of an arbitrary object. Separating the wheat from the > chaff was a little rough so I put that aside and started with a clean > implementation of Scriptable (plus Wrapper) with all of the methods > stubbed out. > > The Scriptable interface does a good job of spelling out the > requirements. After implementing the WrapperFatory.wrapAsJavaObject > override to test for Map instances, everything worked as advertised. > > I think I understand why they did not include this in the core. If they > did then anybody trying to use Map or Collection as a POJO would be > thwarted and there are many different ways to expose these classes to > JavaScript. > > Thanks for the helpful hints. > .