Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdwp/VirtualMachine/AllClassesWithGeneric/allclswithgeneric001t.java
41161 views
/*1* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223package nsk.jdwp.VirtualMachine.AllClassesWithGeneric;2425import java.io.*;2627import nsk.share.*;28import nsk.share.jpda.*;29import nsk.share.jdwp.*;3031public class allclswithgeneric001t {32public static void main(String args[]) {33ArgumentHandler argHandler = new ArgumentHandler(args);34Log log = new Log(System.err, argHandler);35IOPipe pipe = argHandler.createDebugeeIOPipe(log);3637// load tested classes38allclswithgeneric001b<String> _allclswithgeneric001b =39new allclswithgeneric001b<String>();40allclswithgeneric001c<Boolean, Integer> _allclswithgeneric001c =41new allclswithgeneric001c<Boolean, Integer>();42allclswithgeneric001e _allclswithgeneric001e =43new allclswithgeneric001e();44allclswithgeneric001if<Object> _allclswithgeneric001if =45new allclswithgeneric001d<Object>();46allclswithgeneric001f _allclswithgeneric001f =47new allclswithgeneric001f();48allclswithgeneric001g<allclswithgeneric001f> _allclswithgeneric001g =49new allclswithgeneric001g<allclswithgeneric001f>();50allclswithgeneric001h<Byte, Double, Float> _allclswithgeneric001h =51new allclswithgeneric001h<Byte, Double, Float>();5253log.display("Debuggee VM started\nSending command: "54+ allclswithgeneric001.COMMAND_READY);55pipe.println(allclswithgeneric001.COMMAND_READY);5657log.display("Waiting for command: "58+ allclswithgeneric001.COMMAND_QUIT + " ...");59String cmd = pipe.readln();60log.display(" ... Received command: " + cmd61+ "\nDebuggee is exiting ...");6263System.exit(Consts.JCK_STATUS_BASE + Consts.TEST_PASSED);64}65}6667/*68* Dummy classes used only for verifying generic signature information69* in a debugger.70*/7172class allclswithgeneric001b<L extends String> {}7374class allclswithgeneric001c<A, B extends Integer> {}7576interface allclswithgeneric001if<I> {77int allclswithgeneric001ifMeth();7879<I> int allclswithgeneric001ifMeth2(I v);80}8182class allclswithgeneric001d<T> implements allclswithgeneric001if<T> {83public int allclswithgeneric001ifMeth() {84return 1;85}8687public <T> int allclswithgeneric001ifMeth2(T v) {88return 2;89}90}9192class allclswithgeneric001e {}9394class allclswithgeneric001f extends allclswithgeneric001e implements allclswithgeneric001if {95public int allclswithgeneric001ifMeth() {96return 3;97}9899public int allclswithgeneric001ifMeth2(Object v) {100return 4;101}102}103104class allclswithgeneric001g<E extends allclswithgeneric001e & allclswithgeneric001if> {}105106interface allclswithgeneric001if2<A, B, C> {}107108class allclswithgeneric001h<A1, B1, C1>109extends allclswithgeneric001d<A1>110implements allclswithgeneric001if2<A1, B1, C1> {}111112113