Update of the documentation
[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                jautoUnwrap(%f)
59                jimport java.util.Date;
60                jimport java.lang.System;
61
62                t = System.currentTimeMillis();
63                s = jnewInstance(Date, t);
64                str = jnewInstance("java.lang.String", "Hello");
65                d = s.toString()
66
67                jremove Date System t s str;
68                jautoUnwrap(%t)
69       ]]></programlisting>
70     </refsection>
71     <refsection role="see also">
72         <title>See Also</title>
73         <simplelist type="inline">
74             <member>
75                 <link linkend="new">new</link>
76             </member>
77             <member>
78                 <link linkend="jimport">jimport</link>
79             </member>
80         </simplelist>
81     </refsection>
82 </refentry>