1 /* |
|
2 * Copyright (c) 2007, 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 * or visit www.oracle.com if you need additional information or have any |
|
21 * 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 bmo() { return 0; } |
|
133 short smo() { return 0; } |
|
134 int imo() { return 0; } |
|
135 long lmo() { return 0; } |
|
136 float fmo() { return 0; } |
|
137 double dmo() { return 0; } |
|
138 Object omo() { return null; } |
|
139 String tmo() { return ""; } |
|
140 List<String> gmo() { return null; } |
|
141 void vmo() { } |
|
142 |
|
143 byte bmo(int i) { return 0; } |
|
144 short smo(int i) { return 0; } |
|
145 int imo(int i) { return 0; } |
|
146 long lmo(int i) { return 0; } |
|
147 float fmo(int i) { return 0; } |
|
148 double dmo(int i) { return 0; } |
|
149 Object omo(int i) { return null; } |
|
150 String tmo(int i) { return ""; } |
|
151 List<String> gmo(int i) { return null; } |
|
152 void vmo(int i) { } |
|
153 |
|
154 // overloaded native methods |
|
155 native byte bmno(); |
|
156 native short smno(); |
|
157 native int imno(); |
|
158 native long lmno(); |
|
159 native float fmno(); |
|
160 native double dmno(); |
|
161 native Object omno(); |
|
162 native String tmno(); |
|
163 native List<String> gmno(); |
|
164 native void vmno(); |
|
165 native Inner1 icmno(); |
|
166 |
|
167 native byte bmno(int i); |
|
168 native short smno(int i); |
|
169 native int imno(int i); |
|
170 native long lmno(int i); |
|
171 native float fmno(int i); |
|
172 native double dmno(int i); |
|
173 native Object omno(int i); |
|
174 native String tmno(int i); |
|
175 native List<String> gmno(int i); |
|
176 native void vmno(int i); |
|
177 native Inner1 icmno(Inner1 in1); |
|
178 |
|
179 // arg types for Java methods |
|
180 void mb(byte b) { } |
|
181 void ms(short s) { } |
|
182 void mi(int i) { } |
|
183 void ml(long l) { } |
|
184 void mf(float f) { } |
|
185 void md(double d) { } |
|
186 void mo(Object o) { } |
|
187 void mt(String t) { } |
|
188 void mg(List<String> g) { } |
|
189 |
|
190 // arg types for native methods |
|
191 native void mbn(byte b); |
|
192 native void msn(short s); |
|
193 native void min(int i); |
|
194 native void mln(long l); |
|
195 native void mfn(float f); |
|
196 native void mdn(double d); |
|
197 native void mon(Object o); |
|
198 native void mtn(String t); |
|
199 native void mgn(List<String> g); |
|
200 |
|
201 static class Inner1 { |
|
202 // simple types |
|
203 byte b; |
|
204 short s; |
|
205 int i; |
|
206 long l; |
|
207 float f; |
|
208 double d; |
|
209 Object o; |
|
210 String t; |
|
211 List<String> g; |
|
212 |
|
213 // constants |
|
214 static final byte bc = 0; |
|
215 static final short sc = 0; |
|
216 static final int ic = 0; |
|
217 static final long lc = 0; |
|
218 static final float fc = 0; |
|
219 static final double dc = 0; |
|
220 static final Object oc = null; |
|
221 static final String tc = ""; |
|
222 static final List<String> gc = null; |
|
223 |
|
224 // simple arrays |
|
225 byte[] ba; |
|
226 // short[] sa; // not handled corrected by javah v6 |
|
227 int[] ia; |
|
228 long[] la; |
|
229 float[] fa; |
|
230 double[] da; |
|
231 Object[] oa; |
|
232 String[] ta; |
|
233 List<String>[] ga; |
|
234 |
|
235 // multidimensional arrays |
|
236 byte[][] baa; |
|
237 short[][] saa; |
|
238 int[][] iaa; |
|
239 long[][] laa; |
|
240 float[][] faa; |
|
241 double[][] daa; |
|
242 Object[][] oaa; |
|
243 String[][] taa; |
|
244 List<String>[] gaa; |
|
245 |
|
246 // simple Java methods |
|
247 byte bm() { return 0; } |
|
248 short sm() { return 0; } |
|
249 int im() { return 0; } |
|
250 long lm() { return 0; } |
|
251 float fm() { return 0; } |
|
252 double dm() { return 0; } |
|
253 Object om() { return null; } |
|
254 String tm() { return ""; } |
|
255 List<String> gm() { return null; } |
|
256 void vm() { } |
|
257 |
|
258 // simple native methods |
|
259 native byte bmn(); |
|
260 native short smn(); |
|
261 native int imn(); |
|
262 native long lmn(); |
|
263 native float fmn(); |
|
264 native double dmn(); |
|
265 native Object omn(); |
|
266 native String tmn(); |
|
267 native List<String> gmn(); |
|
268 native void vmn(); |
|
269 |
|
270 // overloaded Java methods |
|
271 byte bmo() { return 0; } |
|
272 short smo() { return 0; } |
|
273 int imo() { return 0; } |
|
274 long lmo() { return 0; } |
|
275 float fmo() { return 0; } |
|
276 double dmo() { return 0; } |
|
277 Object omo() { return null; } |
|
278 String tmo() { return ""; } |
|
279 List<String> gmo() { return null; } |
|
280 void vmo() { } |
|
281 |
|
282 byte bmo(int i) { return 0; } |
|
283 short smo(int i) { return 0; } |
|
284 int imo(int i) { return 0; } |
|
285 long lmo(int i) { return 0; } |
|
286 float fmo(int i) { return 0; } |
|
287 double dmo(int i) { return 0; } |
|
288 Object omo(int i) { return null; } |
|
289 String tmo(int i) { return ""; } |
|
290 List<String> gmo(int i) { return null; } |
|
291 void vmo(int i) { } |
|
292 |
|
293 // overloaded native methods |
|
294 native byte bmno(); |
|
295 native short smno(); |
|
296 native int imno(); |
|
297 native long lmno(); |
|
298 native float fmno(); |
|
299 native double dmno(); |
|
300 native Object omno(); |
|
301 native String tmno(); |
|
302 native List<String> gmno(); |
|
303 native void vmno(); |
|
304 |
|
305 native byte bmno(int i); |
|
306 native short smno(int i); |
|
307 native int imno(int i); |
|
308 native long lmno(int i); |
|
309 native float fmno(int i); |
|
310 native double dmno(int i); |
|
311 native Object omno(int i); |
|
312 native String tmno(int i); |
|
313 native List<String> gmno(int i); |
|
314 native void vmno(int i); |
|
315 |
|
316 // arg types for Java methods |
|
317 void mb(byte b) { } |
|
318 void ms(short s) { } |
|
319 void mi(int i) { } |
|
320 void ml(long l) { } |
|
321 void mf(float f) { } |
|
322 void md(double d) { } |
|
323 void mo(Object o) { } |
|
324 void mt(String t) { } |
|
325 void mg(List<String> g) { } |
|
326 |
|
327 // arg types for native methods |
|
328 native void mbn(byte b); |
|
329 native void msn(short s); |
|
330 native void min(int i); |
|
331 native void mln(long l); |
|
332 native void mfn(float f); |
|
333 native void mdn(double d); |
|
334 native void mon(Object o); |
|
335 native void mtn(String t); |
|
336 native void mgn(List<String> g); |
|
337 } |
|
338 |
|
339 class Inner2 { |
|
340 // simple types |
|
341 byte b; |
|
342 short s; |
|
343 int i; |
|
344 long l; |
|
345 float f; |
|
346 double d; |
|
347 Object o; |
|
348 String t; |
|
349 List<String> g; |
|
350 |
|
351 // constants |
|
352 static final byte bc = 0; |
|
353 static final short sc = 0; |
|
354 static final int ic = 0; |
|
355 static final long lc = 0; |
|
356 static final float fc = 0; |
|
357 static final double dc = 0; |
|
358 //static final Object oc = null; |
|
359 static final String tc = ""; |
|
360 //static final List<String> gc = null; |
|
361 |
|
362 // simple arrays |
|
363 byte[] ba; |
|
364 // short[] sa; // not handled corrected by javah v6 |
|
365 int[] ia; |
|
366 long[] la; |
|
367 float[] fa; |
|
368 double[] da; |
|
369 Object[] oa; |
|
370 String[] ta; |
|
371 List<String>[] ga; |
|
372 |
|
373 // multidimensional arrays |
|
374 byte[][] baa; |
|
375 short[][] saa; |
|
376 int[][] iaa; |
|
377 long[][] laa; |
|
378 float[][] faa; |
|
379 double[][] daa; |
|
380 Object[][] oaa; |
|
381 String[][] taa; |
|
382 List<String>[] gaa; |
|
383 |
|
384 // simple Java methods |
|
385 byte bm() { return 0; } |
|
386 short sm() { return 0; } |
|
387 int im() { return 0; } |
|
388 long lm() { return 0; } |
|
389 float fm() { return 0; } |
|
390 double dm() { return 0; } |
|
391 Object om() { return null; } |
|
392 String tm() { return ""; } |
|
393 List<String> gm() { return null; } |
|
394 void vm() { } |
|
395 |
|
396 // simple native methods |
|
397 native byte bmn(); |
|
398 native short smn(); |
|
399 native int imn(); |
|
400 native long lmn(); |
|
401 native float fmn(); |
|
402 native double dmn(); |
|
403 native Object omn(); |
|
404 native String tmn(); |
|
405 native List<String> gmn(); |
|
406 native void vmn(); |
|
407 |
|
408 // overloaded Java methods |
|
409 byte bm1() { return 0; } |
|
410 short sm1() { return 0; } |
|
411 int im1() { return 0; } |
|
412 long lm1() { return 0; } |
|
413 float fm1() { return 0; } |
|
414 double dm1() { return 0; } |
|
415 Object om1() { return null; } |
|
416 String tm1() { return ""; } |
|
417 List<String> gm1() { return null; } |
|
418 void vm1() { } |
|
419 |
|
420 byte bm2(int i) { return 0; } |
|
421 short sm2(int i) { return 0; } |
|
422 int im2(int i) { return 0; } |
|
423 long lm2(int i) { return 0; } |
|
424 float fm2(int i) { return 0; } |
|
425 double dm2(int i) { return 0; } |
|
426 Object om2(int i) { return null; } |
|
427 String tm2(int i) { return ""; } |
|
428 List<String> gm2(int i) { return null; } |
|
429 void vm2(int i) { } |
|
430 |
|
431 // overloaded native methods |
|
432 native byte bmn1(); |
|
433 native short smn1(); |
|
434 native int imn1(); |
|
435 native long lmn1(); |
|
436 native float fmn1(); |
|
437 native double dmn1(); |
|
438 native Object omn1(); |
|
439 native String tmn1(); |
|
440 native List<String> gmn1(); |
|
441 native void vmn1(); |
|
442 |
|
443 native byte bmn2(int i); |
|
444 native short smn2(int i); |
|
445 native int imn2(int i); |
|
446 native long lmn2(int i); |
|
447 native float fmn2(int i); |
|
448 native double dmn2(int i); |
|
449 native Object omn2(int i); |
|
450 native String tmn2(int i); |
|
451 native List<String> gmn2(int i); |
|
452 native void vmn2(int i); |
|
453 |
|
454 // arg types for Java methods |
|
455 void mb(byte b) { } |
|
456 void ms(short s) { } |
|
457 void mi(int i) { } |
|
458 void ml(long l) { } |
|
459 void mf(float f) { } |
|
460 void md(double d) { } |
|
461 void mo(Object o) { } |
|
462 void mt(String t) { } |
|
463 void mg(List<String> g) { } |
|
464 |
|
465 // arg types for native methods |
|
466 native void mbn(byte b); |
|
467 native void msn(short s); |
|
468 native void min(int i); |
|
469 native void mln(long l); |
|
470 native void mfn(float f); |
|
471 native void mdn(double d); |
|
472 native void mon(Object o); |
|
473 native void mtn(String t); |
|
474 native void mgn(List<String> g); |
|
475 } |
|
476 |
|
477 } |
|