Scilab-Branch-6.1-GIT
- Справка Scilab
- Java из Scilab
- Getting started - Beginning
- Getting started - Second step
- jallowClassReloading
- jarray
- jautoTranspose
- jautoUnwrap
- jcast
- jcompile
- jcreatejar
- jdeff
- jdisableTrace
- jenableTrace
- jexists
- jgetclassname
- jgetfield
- jgetfields
- jgetinfo
- jgetmethods
- jimport
- jinvoke
- jinvoke_db
- jnewInstance
- jnull
- jremove
- jsetfield
- junwrap
- junwraprem
- jvoid
- jwrap
- jwrapinchar
- jwrapinfloat
- new
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
jcast
Cast a Java object into another one.
Syntax
jcast(javaObject, class)
Parameters
- javaObject
A mlist typed _JObj
- class
A string giving the class name or a mlist typed _JClass got with jimport or jcompile
Description
Cast an object into another one with the given class if it is possible.
Examples
jimport java.lang.Double; jimport java.lang.Number; d = Double.new("1.23456"); jgetclassname(d) e = jcast(d, "java.lang.Number"); // or as an alternative f = jcast(d, Number); jgetclassname(e) jremove e d f;
See also
- jgetclassname — Return the class name of the given object
History
Версия | Описание |
5.5.0 | Function introduced. Based on the 'JIMS' module. The main difference in the behavior compared to the JIMS module is that jautoUnwrap is enabled by default. |
Report an issue | ||
<< jautoUnwrap | Java из Scilab | jcompile >> |