added japanese translation of java external object.
[scilab.git] / scilab / modules / external_objects_java / help / ja_JP / jinvoke.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4 *
5 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
6 * Copyright (C) 2010 - 2011 - Calixte DENIZET <calixte@contrib.scilab.org>
7 *
8 * This file must be used under the terms of the CeCILL.
9 * This source file is licensed as described in the file COPYING, which
10 * you should have received as part of this distribution.  The terms
11 * are also available at
12 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
13 *
14 *
15 -->
16
17 <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="ja" xml:id="jinvoke">
18     
19     <refnamediv>
20         
21         <refname>jinvoke</refname>
22         
23         <refpurpose>
24             
25             Javaオブジェクトのメソッドを呼び出す
26             
27         </refpurpose>
28         
29     </refnamediv>
30     
31     <refsynopsisdiv>
32         
33         <title>呼び出し手順</title>
34         
35         <synopsis>
36             
37             ret = jinvoke(object, methodName [, arg_1 [, arg_2...]])
38             
39         </synopsis>
40         
41     </refsynopsisdiv>
42     
43     <refsection>
44         
45         <title>パラメータ</title>
46         
47         <variablelist>
48             
49             <varlistentry>
50                 
51                 <term>object</term>
52                 
53                 <listitem>
54                     
55                     <para>
56                         
57                         _JObjまたは_JClass型のmlistまたはScilab変数
58                         
59                     </para>
60                     
61                 </listitem>
62                 
63             </varlistentry>
64             
65             <varlistentry>
66                 
67                 <term>methodName</term>
68                 
69                 <listitem>
70                     
71                     <para>メソッド名を指定する文字列</para>
72                     
73                 </listitem>
74                 
75             </varlistentry>
76             
77             <varlistentry>
78                 
79                 <term>arg_i</term>
80                 
81                 <listitem>
82                     
83                     <para>メソッド引数用のScilab変数</para>
84                     
85                 </listitem>
86                 
87             </varlistentry>
88             
89         </variablelist>
90         
91     </refsection>
92     
93     <refsection>
94         
95         <title>説明</title>
96         
97         <para>
98             
99             指定したオブジェクトのmethodNameという名前の
100             
101             (静的またはそれ以外の)Javaメソッドをコールします.
102             
103             結果は, _JObj型のmlistとして返されます.
104             
105         </para>
106         
107         <para>
108             
109             ポリモーフィズムはJavaリフレクションにより処理され,
110             
111             autoboxingも処理されます.
112             
113             このため, ArrayList.add(1.234) または ArrayList.add("Hello") 
114             
115             も使用可能です.
116             
117             メソッド Foo.bar(int)が存在する場合, 123 が Scilab double
118             
119             の場合でも, Foo.bar(123) と書くことができます.
120             
121             しかし, Foo.bar(double) が存在する場合には, こちらが
122             
123             選択されます.
124             
125         </para>
126         
127     </refsection>
128     
129     <refsection>
130         
131         <title>例</title>
132         
133         <programlisting role="example"><![CDATA[
134                jimport java.lang.System;
135                jimport java.awt.Color;
136                jimport java.lang.String;
137
138                // 非静的メソッド
139                jinvoke("Hello World !!", "length");
140                str = String.new("Hello");
141                jinvoke(str,"substring",1, 4)
142
143
144                // 静的メソッド
145                T = jinvoke(System, "getProperty", "java.version");
146
147                // 混用
148                c = jinvoke(Color, "decode", "123456");
149                cb = jinvoke(c, "brighter");
150
151                jcode = jinvoke(cb, "getRGB");
152
153                jremove System Color T c cb jcode;
154       ]]></programlisting>
155         
156     </refsection>
157     
158     <refsection role="see also">
159         
160         <title>参照</title>
161         
162         <simplelist type="inline">
163             
164             <member>
165                 
166                 <link linkend="jautoUnwrap">jautoUnwrap</link>
167                 
168             </member>
169             
170             <member>
171                 
172                 <link linkend="jinvoke_db">jinvoke_db</link>
173                 
174             </member>
175             
176         </simplelist>
177         
178     </refsection>
179     
180     <refsection>
181         
182         <title>履歴</title>
183         
184         <revhistory>
185             
186             <revision>
187                 
188                 <revnumber>5.5.0</revnumber>
189                 
190                 <revremark>
191                     
192                     関数が導入されました. 'JIMS'モジュールに基づきます.
193                     
194                     JIMSモジュールとの動作上の主な違いは,
195                     
196                     <link linkend="jautoUnwrap">jautoUnwrap</link>がデフォルトで
197                     
198                     有効になっていることです.
199                     
200                 </revremark>
201                 
202             </revision>
203             
204         </revhistory>
205         
206     </refsection>
207     
208 </refentry>
209
210
211