The to function converts the argument to a Java dataype. The source object jsData is expected to be a
JavaScript array, or object with a length property. The target toType can either be a String (e.g. "int[]")
or a type object (e.g., Java.type("int[]")). Valid target types are Java arrays. When no target type is
provided, Object[] is assumed.
The conversion methods as defined by ECMAScript (e.g., ToString, ToDouble) are executed when a JavaScript
value has to be converted to a Java type. Lossy conversion is disallowed and results in a TypeError.
The
to
function converts the argument to a Java dataype. The source object jsData is expected to be a JavaScript array, or object with alength
property. The target toType can either be a String (e.g. "int[]") or a type object (e.g., Java.type("int[]")). Valid target types are Java arrays. When no target type is provided, Object[] is assumed.The conversion methods as defined by ECMAScript (e.g., ToString, ToDouble) are executed when a JavaScript value has to be converted to a Java type. Lossy conversion is disallowed and results in a TypeError.