d324e18d4f7730973c807e4dfc8c06da75357184
[scilab.git] / scilab / modules / external_objects_java / help / en_US / jnewInstance.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 *
4 * JIMS ( http://forge.scilab.org/index.php/p/JIMS/ ) - This file is a part of JIMS
5 * Copyright (C) 2010 - 2011 - Calixte DENIZET <calixte@contrib.scilab.org>
6 *
7 * This file must be used under the terms of the CeCILL.
8 * This source file is licensed as described in the file COPYING, which
9 * you should have received as part of this distribution.  The terms
10 * are also available at
11 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
12 *
13 *
14 -->
15 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="jnewInstance">
16     <refnamediv>
17         <refname>jnewInstance</refname>
18         <refpurpose>Creates a new instance of a Java class</refpurpose>
19     </refnamediv>
20     <refsynopsisdiv>
21         <title>Calling Sequence</title>
22         <synopsis>
23             obj = jnewInstance(class [, arg_1 [, arg_2... ]])
24         </synopsis>
25     </refsynopsisdiv>
26     <refsection>
27         <title>Parameters</title>
28         <variablelist>
29             <varlistentry>
30                 <term>class</term>
31                 <listitem>
32                     <para>A mlist typed _JClass or a string containing the class name</para>
33                 </listitem>
34             </varlistentry>
35             <varlistentry>
36                 <term>arg_i</term>
37                 <listitem>
38                     <para>A Scilab data or a mlist typed _JObj</para>
39                 </listitem>
40             </varlistentry>
41             <varlistentry>
42                 <term>obj</term>
43                 <listitem>
44                     <para>A mlist typed _JObj</para>
45                 </listitem>
46             </varlistentry>
47         </variablelist>
48     </refsection>
49     <refsection>
50         <title>Description</title>
51         <para>
52             Creates a new instance of a Java class obtained with <link linkend="jimport">jimport</link>.
53         </para>
54     </refsection>
55     <refsection>
56         <title>Examples</title>
57         <programlisting role="example"><![CDATA[
58                jimport java.util.Date;
59                jimport java.lang.System;
60
61                t = System.currentTimeMillis();
62                s = jnewInstance(Date, t);
63                str = jnewInstance("java.lang.String", "Hello");
64                d = s.toString()
65
66                jremove Date System t s str;
67       ]]></programlisting>
68     </refsection>
69     <refsection role="see also">
70         <title>See Also</title>
71         <simplelist type="inline">
72             <member>
73                 <link linkend="new">new</link>
74             </member>
75             <member>
76                 <link linkend="jimport">jimport</link>
77             </member>
78         </simplelist>
79     </refsection>
80 </refentry>