On Mon, Dec 28, 2009 at 12:34 PM, Mark Storer <[email protected]> wrote:
> 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. > > Thanks, Mark, after I sent my first email, I thought annotations would be a good way to implement part of what I'd like to do. Here, it seems the annotations are an alternative to the naming convention for a host object. What I'd like to do is mark a public method on my domain POJO as "private" from the perspective of Rhino. I think if had that I'd be happy. I'd probably still want to wrap the domain classes in a "JS API" class. The wrapper would implement Scriptable and use annotations to determine if the domain method being accessed (via scriptable.get("myMethod", start), for example) should be allowed. While annotations would be nice, a Scriptable class that has a list of excluded methods would probably be sufficient. -- 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
