Hi Sanka,

thank you for your feedback!

thinking about String-->Object type conversion to incorporate into BSF it will mostlikely make sense to do the same for the primitive datatype wrapper classes like Byte and the like, or no type conversion at all (in which case it is left to the BSF engine implementors to convert on their own). Again, such a need would occur only if a Java field/method argument needs type Object values only.

So what would you think, would it add too much overhead or would it be acceptable?

IMUO I think it'll add too much of overhead to TypeConvertorRegistry.

Adding such a conversion might result in the necessity to add quite a number of other type conversions (e.g. Char[] -> Object[]) which I think too much overhead. :(
Well, arrays would not be primitive datatypes, so this would not pertain to them. Although, you are right, if thinking about char[]->String, byte[]->String, String->char[], or String->byte[].

OTOH, the penalty would be mostly in the lookup of the type convertors, which shouldn't be that bad, after all.

Regards,

---rony


Reply via email to