|
1 /* |
|
2 * Copyright (c) 2003, 2018, 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 package nsk.jdwp.VirtualMachine.AllClassesWithGeneric; |
|
25 |
|
26 import java.io.*; |
|
27 |
|
28 import nsk.share.*; |
|
29 import nsk.share.jpda.*; |
|
30 import nsk.share.jdwp.*; |
|
31 |
|
32 public class allclswithgeneric001t { |
|
33 public static void main(String args[]) { |
|
34 ArgumentHandler argHandler = new ArgumentHandler(args); |
|
35 Log log = new Log(System.err, argHandler); |
|
36 IOPipe pipe = argHandler.createDebugeeIOPipe(log); |
|
37 |
|
38 // load tested classes |
|
39 allclswithgeneric001b<String> _allclswithgeneric001b = |
|
40 new allclswithgeneric001b<String>(); |
|
41 allclswithgeneric001c<Boolean, Integer> _allclswithgeneric001c = |
|
42 new allclswithgeneric001c<Boolean, Integer>(); |
|
43 allclswithgeneric001e _allclswithgeneric001e = |
|
44 new allclswithgeneric001e(); |
|
45 allclswithgeneric001if<Object> _allclswithgeneric001if = |
|
46 new allclswithgeneric001d<Object>(); |
|
47 allclswithgeneric001f _allclswithgeneric001f = |
|
48 new allclswithgeneric001f(); |
|
49 allclswithgeneric001g<allclswithgeneric001f> _allclswithgeneric001g = |
|
50 new allclswithgeneric001g<allclswithgeneric001f>(); |
|
51 allclswithgeneric001h<Byte, Double, Float> _allclswithgeneric001h = |
|
52 new allclswithgeneric001h<Byte, Double, Float>(); |
|
53 |
|
54 log.display("Debuggee VM started\nSending command: " |
|
55 + allclswithgeneric001.COMMAND_READY); |
|
56 pipe.println(allclswithgeneric001.COMMAND_READY); |
|
57 |
|
58 log.display("Waiting for command: " |
|
59 + allclswithgeneric001.COMMAND_QUIT + " ..."); |
|
60 String cmd = pipe.readln(); |
|
61 log.display(" ... Received command: " + cmd |
|
62 + "\nDebuggee is exiting ..."); |
|
63 |
|
64 System.exit(Consts.JCK_STATUS_BASE + Consts.TEST_PASSED); |
|
65 } |
|
66 } |
|
67 |
|
68 /* |
|
69 * Dummy classes used only for verifying generic signature information |
|
70 * in a debugger. |
|
71 */ |
|
72 |
|
73 class allclswithgeneric001b<L extends String> {} |
|
74 |
|
75 class allclswithgeneric001c<A, B extends Integer> {} |
|
76 |
|
77 interface allclswithgeneric001if<I> { |
|
78 int allclswithgeneric001ifMeth(); |
|
79 |
|
80 <I> int allclswithgeneric001ifMeth2(I v); |
|
81 } |
|
82 |
|
83 class allclswithgeneric001d<T> implements allclswithgeneric001if<T> { |
|
84 public int allclswithgeneric001ifMeth() { |
|
85 return 1; |
|
86 } |
|
87 |
|
88 public <T> int allclswithgeneric001ifMeth2(T v) { |
|
89 return 2; |
|
90 } |
|
91 } |
|
92 |
|
93 class allclswithgeneric001e {} |
|
94 |
|
95 class allclswithgeneric001f extends allclswithgeneric001e implements allclswithgeneric001if { |
|
96 public int allclswithgeneric001ifMeth() { |
|
97 return 3; |
|
98 } |
|
99 |
|
100 public int allclswithgeneric001ifMeth2(Object v) { |
|
101 return 4; |
|
102 } |
|
103 } |
|
104 |
|
105 class allclswithgeneric001g<E extends allclswithgeneric001e & allclswithgeneric001if> {} |
|
106 |
|
107 interface allclswithgeneric001if2<A, B, C> {} |
|
108 |
|
109 class allclswithgeneric001h<A1, B1, C1> |
|
110 extends allclswithgeneric001d<A1> |
|
111 implements allclswithgeneric001if2<A1, B1, C1> {} |