IIRC, there's an annotation-based object exposer in the source, but I don't
see anything in the .jar...

Yep.
http://mxr.mozilla.org/mozilla/source/js/rhino/src/org/mozilla/javascript/annotations/

I'm not aware of any code actually *using* those annotations.  Furthermore,
the entire "annotations.*" package is missing from the jar file.

--Mark Storer

On Fri, Dec 25, 2009 at 6:27 PM, Daryl Stultz <[email protected]> wrote:

> Hey all,
>
> I've been using Rhino for some time now in my application. I simply use
> POJO
> objects and let them get auto-wrapped by Rhino. I've been reading the docs
> about host objects and I seem a bit unclear what the purpose is. I don't
> see
> what the benefit of writing
>
> public void jsFunction_resetCount()
> vs just
> public void resetCount().
>
> Is it just the ability to add dynamic properties to an object?
>
> Ultimately I'm looking for a better solution to my application design. I've
> got a domain object, say MyEntity and a wrapper class called JsMyEntity
> that
> forwards methods to MyEntity delegate. This is so I can restrict access to
> various methods of the domain class and I have a "JS API" class that
> clearly
> defines what's exposed to JavaScript.
>
> I don't like writing the wrapper class. It's too much maintenance and prone
> to error. I'm looking for some feature of Rhino or JavaScript that might
> let
> me more easily define what methods of the domain class are accessible. I'm
> wondering if a host object has such features. Any input on how others are
> handling this type of thing would be appreciated.
>
> Thanks.
>
> --
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:[email protected]
> _______________________________________________
> dev-tech-js-engine-rhino mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
>



-- 
--Mark Storer
Professional Geek
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to