Johan Compagner wrote: > If we suddenly would get PrimitiveXxx objects instead of the normal > Xxx objects our complete application would break big time, we do use > varargs/object[] quite a lot.. > > If you want something like this then only wrap the Xxx to PrimitiveXxx > if the method that is called has those arguments types. so you as a > developer of the java part chooses for it and the wrapfactory or > something like that knows how to wrap it foir you just before the call
this is not possible. Just think at Array.push which is implemented in NativeArray.js_push. It receives the arguments as Object[] args. When the method is called with a primitive as argument, it has to save the scope information of the primitive (ie a PrimitiveXxxx) otherwise this information won't be available anymore when the primitive is retrieved from the array. The goal of a WrapFactory is significantly different and it doesn't help at all here. Cheers, Marc. -- Web: http://www.efficient-webtesting.com Blog: http://mguillem.wordpress.com _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
