|
1 /* |
|
2 * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. |
|
8 * |
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
|
13 * accompanied this code). |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License version |
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 * |
|
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
20 * CA 95054 USA or visit www.sun.com if you need additional information or |
|
21 * have any questions. |
|
22 */ |
|
23 |
|
24 import java.util.List; |
|
25 |
|
26 public class TestClass1 { |
|
27 // simple types |
|
28 byte b; |
|
29 short s; |
|
30 int i; |
|
31 long l; |
|
32 float f; |
|
33 double d; |
|
34 Object o; |
|
35 String t; |
|
36 List<String> g; |
|
37 |
|
38 // constants |
|
39 static final byte bc = 0; |
|
40 static final short sc = 0; |
|
41 static final int ic = 0; |
|
42 static final long lc = 0; |
|
43 static final float fc = 0; |
|
44 static final double dc = 0; |
|
45 static final Object oc = null; |
|
46 static final String tc = ""; |
|
47 static final List<String> gc = null; |
|
48 |
|
49 // simple arrays |
|
50 byte[] ba; |
|
51 short[] sa; // not handled corrected by javah v6 |
|
52 int[] ia; |
|
53 long[] la; |
|
54 float[] fa; |
|
55 double[] da; |
|
56 Object[] oa; |
|
57 String[] ta; |
|
58 List<String>[] ga; |
|
59 |
|
60 // multidimensional arrays |
|
61 byte[][] baa; |
|
62 short[][] saa; |
|
63 int[][] iaa; |
|
64 long[][] laa; |
|
65 float[][] faa; |
|
66 double[][] daa; |
|
67 Object[][] oaa; |
|
68 String[][] taa; |
|
69 List<String>[] gaa; |
|
70 |
|
71 // simple Java methods |
|
72 byte bm() { return 0; } |
|
73 short sm() { return 0; } |
|
74 int im() { return 0; } |
|
75 long lm() { return 0; } |
|
76 float fm() { return 0; } |
|
77 double dm() { return 0; } |
|
78 Object om() { return null; } |
|
79 String tm() { return ""; } |
|
80 List<String> gm() { return null; } |
|
81 void vm() { } |
|
82 byte[] bam() { return null; } |
|
83 short[] sam() { return null; } |
|
84 int[] iam() { return null; } |
|
85 long[] lam() { return null; } |
|
86 float[] fam() { return null; } |
|
87 double[] dam() { return null; } |
|
88 Object[] oam() { return null; } |
|
89 String[] tam() { return null; } |
|
90 List<String>[] gam() { return null; } |
|
91 byte[][] baam() { return null; } |
|
92 short[][] saam() { return null; } |
|
93 int[][] iaam() { return null; } |
|
94 long[][] laam() { return null; } |
|
95 float[][] faam() { return null; } |
|
96 double[][] daam() { return null; } |
|
97 Object[][] oaam() { return null; } |
|
98 String[][] taam() { return null; } |
|
99 List<String>[] gaam() { return null; } |
|
100 |
|
101 // simple native methods |
|
102 native byte bmn(); |
|
103 native short smn(); |
|
104 native int imn(); |
|
105 native long lmn(); |
|
106 native float fmn(); |
|
107 native double dmn(); |
|
108 native Object omn(); |
|
109 native String tmn(); |
|
110 native List<String> gmn(); |
|
111 native void vmn(); |
|
112 native byte[] bamn(); |
|
113 native short[] samn(); |
|
114 native int[] iamn(); |
|
115 native long[] lamn(); |
|
116 native float[] famn(); |
|
117 native double[] damn(); |
|
118 native Object[] oamn(); |
|
119 native String[] tamn(); |
|
120 native List<String>[] gamn(); |
|
121 native byte[][] baamn(); |
|
122 native short[][] saamn(); |
|
123 native int[][] iaamn(); |
|
124 native long[][] laamn(); |
|
125 native float[][] faamn(); |
|
126 native double[][] daamn(); |
|
127 native Object[][] oaamn(); |
|
128 native String[][] taamn(); |
|
129 native List<String>[] gaamn(); |
|
130 |
|
131 // overloaded Java methods |
|
132 byte bm1() { return 0; } |
|
133 short sm1() { return 0; } |
|
134 int im1() { return 0; } |
|
135 long lm1() { return 0; } |
|
136 float fm1() { return 0; } |
|
137 double dm1() { return 0; } |
|
138 Object om1() { return null; } |
|
139 String tm1() { return ""; } |
|
140 List<String> gm1() { return null; } |
|
141 void vm1() { } |
|
142 |
|
143 byte bm2(int i) { return 0; } |
|
144 short sm2(int i) { return 0; } |
|
145 int im2(int i) { return 0; } |
|
146 long lm2(int i) { return 0; } |
|
147 float fm2(int i) { return 0; } |
|
148 double dm2(int i) { return 0; } |
|
149 Object om2(int i) { return null; } |
|
150 String tm2(int i) { return ""; } |
|
151 List<String> gm2(int i) { return null; } |
|
152 void vm2(int i) { } |
|
153 |
|
154 // overloaded native methods |
|
155 native byte bmn1(); |
|
156 native short smn1(); |
|
157 native int imn1(); |
|
158 native long lmn1(); |
|
159 native float fmn1(); |
|
160 native double dmn1(); |
|
161 native Object omn1(); |
|
162 native String tmn1(); |
|
163 native List<String> gmn1(); |
|
164 native void vmn1(); |
|
165 |
|
166 native byte bmn2(int i); |
|
167 native short smn2(int i); |
|
168 native int imn2(int i); |
|
169 native long lmn2(int i); |
|
170 native float fmn2(int i); |
|
171 native double dmn2(int i); |
|
172 native Object omn2(int i); |
|
173 native String tmn2(int i); |
|
174 native List<String> gmn2(int i); |
|
175 native void vmn2(int i); |
|
176 |
|
177 // arg types for Java methods |
|
178 void mb(byte b) { } |
|
179 void ms(short s) { } |
|
180 void mi(int i) { } |
|
181 void ml(long l) { } |
|
182 void mf(float f) { } |
|
183 void md(double d) { } |
|
184 void mo(Object o) { } |
|
185 void mt(String t) { } |
|
186 void mg(List<String> g) { } |
|
187 |
|
188 // arg types for native methods |
|
189 native void mbn(byte b); |
|
190 native void msn(short s); |
|
191 native void min(int i); |
|
192 native void mln(long l); |
|
193 native void mfn(float f); |
|
194 native void mdn(double d); |
|
195 native void mon(Object o); |
|
196 native void mtn(String t); |
|
197 native void mgn(List<String> g); |
|
198 |
|
199 static class Inner1 { |
|
200 // simple types |
|
201 byte b; |
|
202 short s; |
|
203 int i; |
|
204 long l; |
|
205 float f; |
|
206 double d; |
|
207 Object o; |
|
208 String t; |
|
209 List<String> g; |
|
210 |
|
211 // constants |
|
212 static final byte bc = 0; |
|
213 static final short sc = 0; |
|
214 static final int ic = 0; |
|
215 static final long lc = 0; |
|
216 static final float fc = 0; |
|
217 static final double dc = 0; |
|
218 static final Object oc = null; |
|
219 static final String tc = ""; |
|
220 static final List<String> gc = null; |
|
221 |
|
222 // simple arrays |
|
223 byte[] ba; |
|
224 // short[] sa; // not handled corrected by javah v6 |
|
225 int[] ia; |
|
226 long[] la; |
|
227 float[] fa; |
|
228 double[] da; |
|
229 Object[] oa; |
|
230 String[] ta; |
|
231 List<String>[] ga; |
|
232 |
|
233 // multidimensional arrays |
|
234 byte[][] baa; |
|
235 short[][] saa; |
|
236 int[][] iaa; |
|
237 long[][] laa; |
|
238 float[][] faa; |
|
239 double[][] daa; |
|
240 Object[][] oaa; |
|
241 String[][] taa; |
|
242 List<String>[] gaa; |
|
243 |
|
244 // simple Java methods |
|
245 byte bm() { return 0; } |
|
246 short sm() { return 0; } |
|
247 int im() { return 0; } |
|
248 long lm() { return 0; } |
|
249 float fm() { return 0; } |
|
250 double dm() { return 0; } |
|
251 Object om() { return null; } |
|
252 String tm() { return ""; } |
|
253 List<String> gm() { return null; } |
|
254 void vm() { } |
|
255 |
|
256 // simple native methods |
|
257 native byte bmn(); |
|
258 native short smn(); |
|
259 native int imn(); |
|
260 native long lmn(); |
|
261 native float fmn(); |
|
262 native double dmn(); |
|
263 native Object omn(); |
|
264 native String tmn(); |
|
265 native List<String> gmn(); |
|
266 native void vmn(); |
|
267 |
|
268 // overloaded Java methods |
|
269 byte bm1() { return 0; } |
|
270 short sm1() { return 0; } |
|
271 int im1() { return 0; } |
|
272 long lm1() { return 0; } |
|
273 float fm1() { return 0; } |
|
274 double dm1() { return 0; } |
|
275 Object om1() { return null; } |
|
276 String tm1() { return ""; } |
|
277 List<String> gm1() { return null; } |
|
278 void vm1() { } |
|
279 |
|
280 byte bm2(int i) { return 0; } |
|
281 short sm2(int i) { return 0; } |
|
282 int im2(int i) { return 0; } |
|
283 long lm2(int i) { return 0; } |
|
284 float fm2(int i) { return 0; } |
|
285 double dm2(int i) { return 0; } |
|
286 Object om2(int i) { return null; } |
|
287 String tm2(int i) { return ""; } |
|
288 List<String> gm2(int i) { return null; } |
|
289 void vm2(int i) { } |
|
290 |
|
291 // overloaded native methods |
|
292 native byte bmn1(); |
|
293 native short smn1(); |
|
294 native int imn1(); |
|
295 native long lmn1(); |
|
296 native float fmn1(); |
|
297 native double dmn1(); |
|
298 native Object omn1(); |
|
299 native String tmn1(); |
|
300 native List<String> gmn1(); |
|
301 native void vmn1(); |
|
302 |
|
303 native byte bmn2(int i); |
|
304 native short smn2(int i); |
|
305 native int imn2(int i); |
|
306 native long lmn2(int i); |
|
307 native float fmn2(int i); |
|
308 native double dmn2(int i); |
|
309 native Object omn2(int i); |
|
310 native String tmn2(int i); |
|
311 native List<String> gmn2(int i); |
|
312 native void vmn2(int i); |
|
313 |
|
314 // arg types for Java methods |
|
315 void mb(byte b) { } |
|
316 void ms(short s) { } |
|
317 void mi(int i) { } |
|
318 void ml(long l) { } |
|
319 void mf(float f) { } |
|
320 void md(double d) { } |
|
321 void mo(Object o) { } |
|
322 void mt(String t) { } |
|
323 void mg(List<String> g) { } |
|
324 |
|
325 // arg types for native methods |
|
326 native void mbn(byte b); |
|
327 native void msn(short s); |
|
328 native void min(int i); |
|
329 native void mln(long l); |
|
330 native void mfn(float f); |
|
331 native void mdn(double d); |
|
332 native void mon(Object o); |
|
333 native void mtn(String t); |
|
334 native void mgn(List<String> g); |
|
335 } |
|
336 |
|
337 class Inner2 { |
|
338 // simple types |
|
339 byte b; |
|
340 short s; |
|
341 int i; |
|
342 long l; |
|
343 float f; |
|
344 double d; |
|
345 Object o; |
|
346 String t; |
|
347 List<String> g; |
|
348 |
|
349 // constants |
|
350 static final byte bc = 0; |
|
351 static final short sc = 0; |
|
352 static final int ic = 0; |
|
353 static final long lc = 0; |
|
354 static final float fc = 0; |
|
355 static final double dc = 0; |
|
356 //static final Object oc = null; |
|
357 static final String tc = ""; |
|
358 //static final List<String> gc = null; |
|
359 |
|
360 // simple arrays |
|
361 byte[] ba; |
|
362 // short[] sa; // not handled corrected by javah v6 |
|
363 int[] ia; |
|
364 long[] la; |
|
365 float[] fa; |
|
366 double[] da; |
|
367 Object[] oa; |
|
368 String[] ta; |
|
369 List<String>[] ga; |
|
370 |
|
371 // multidimensional arrays |
|
372 byte[][] baa; |
|
373 short[][] saa; |
|
374 int[][] iaa; |
|
375 long[][] laa; |
|
376 float[][] faa; |
|
377 double[][] daa; |
|
378 Object[][] oaa; |
|
379 String[][] taa; |
|
380 List<String>[] gaa; |
|
381 |
|
382 // simple Java methods |
|
383 byte bm() { return 0; } |
|
384 short sm() { return 0; } |
|
385 int im() { return 0; } |
|
386 long lm() { return 0; } |
|
387 float fm() { return 0; } |
|
388 double dm() { return 0; } |
|
389 Object om() { return null; } |
|
390 String tm() { return ""; } |
|
391 List<String> gm() { return null; } |
|
392 void vm() { } |
|
393 |
|
394 // simple native methods |
|
395 native byte bmn(); |
|
396 native short smn(); |
|
397 native int imn(); |
|
398 native long lmn(); |
|
399 native float fmn(); |
|
400 native double dmn(); |
|
401 native Object omn(); |
|
402 native String tmn(); |
|
403 native List<String> gmn(); |
|
404 native void vmn(); |
|
405 |
|
406 // overloaded Java methods |
|
407 byte bm1() { return 0; } |
|
408 short sm1() { return 0; } |
|
409 int im1() { return 0; } |
|
410 long lm1() { return 0; } |
|
411 float fm1() { return 0; } |
|
412 double dm1() { return 0; } |
|
413 Object om1() { return null; } |
|
414 String tm1() { return ""; } |
|
415 List<String> gm1() { return null; } |
|
416 void vm1() { } |
|
417 |
|
418 byte bm2(int i) { return 0; } |
|
419 short sm2(int i) { return 0; } |
|
420 int im2(int i) { return 0; } |
|
421 long lm2(int i) { return 0; } |
|
422 float fm2(int i) { return 0; } |
|
423 double dm2(int i) { return 0; } |
|
424 Object om2(int i) { return null; } |
|
425 String tm2(int i) { return ""; } |
|
426 List<String> gm2(int i) { return null; } |
|
427 void vm2(int i) { } |
|
428 |
|
429 // overloaded native methods |
|
430 native byte bmn1(); |
|
431 native short smn1(); |
|
432 native int imn1(); |
|
433 native long lmn1(); |
|
434 native float fmn1(); |
|
435 native double dmn1(); |
|
436 native Object omn1(); |
|
437 native String tmn1(); |
|
438 native List<String> gmn1(); |
|
439 native void vmn1(); |
|
440 |
|
441 native byte bmn2(int i); |
|
442 native short smn2(int i); |
|
443 native int imn2(int i); |
|
444 native long lmn2(int i); |
|
445 native float fmn2(int i); |
|
446 native double dmn2(int i); |
|
447 native Object omn2(int i); |
|
448 native String tmn2(int i); |
|
449 native List<String> gmn2(int i); |
|
450 native void vmn2(int i); |
|
451 |
|
452 // arg types for Java methods |
|
453 void mb(byte b) { } |
|
454 void ms(short s) { } |
|
455 void mi(int i) { } |
|
456 void ml(long l) { } |
|
457 void mf(float f) { } |
|
458 void md(double d) { } |
|
459 void mo(Object o) { } |
|
460 void mt(String t) { } |
|
461 void mg(List<String> g) { } |
|
462 |
|
463 // arg types for native methods |
|
464 native void mbn(byte b); |
|
465 native void msn(short s); |
|
466 native void min(int i); |
|
467 native void mln(long l); |
|
468 native void mfn(float f); |
|
469 native void mdn(double d); |
|
470 native void mon(Object o); |
|
471 native void mtn(String t); |
|
472 native void mgn(List<String> g); |
|
473 } |
|
474 |
|
475 } |