Convert a JavaScript value into the desired type. Uses the semantics defined with LiveConnect3 and throws an Illegal argument exception if the conversion cannot be performed. @param value the JavaScript value to convert @param desiredType the Java type to convert to. Primitive Java types are repres
(Object value, Class<?> desiredType)
| 1880 | * @throws EvaluatorException if the conversion cannot be performed |
| 1881 | */ |
| 1882 | public static Object jsToJava(Object value, Class<?> desiredType) throws EvaluatorException { |
| 1883 | return jsToJava(value, TypeInfoFactory.GLOBAL.create(desiredType)); |
| 1884 | } |
| 1885 | |
| 1886 | public static Object jsToJava(Object value, TypeInfo desiredType) throws EvaluatorException { |
| 1887 | return NativeJavaObject.coerceTypeImpl(desiredType, value); |