On Tue, Dec 29, 2009 at 1:59 PM, Norris Boyd <[email protected]> wrote:
> For most uses, just wrapping POJOs is sufficient. Essentially I'm wrapping a POJO with another POJO at the present. > > The main thing you can do with the host object APIs that you can't do > with wrapping POJOs is writing generic property getters, for example > as was done with > http://mxr.mozilla.org/mozilla/source/js/rhino/examples/Matrix.java. > > Are you referring to the fact that there is no getter/setter for the "dim" property and the implementation of get/put provides the functionality of get/set? That's similar to what I want to do. My host object would be generic with no properties, just the inner POJO delegate. A call to get/put would cause the host object to use reflection to access the appropriate getter/setter in the delegate (or in a subclass of the host object). I'm not sure how this could be done for a method/function though. Any ideas? -- 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
