Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/Accessible/isPackagePrivate/accipp001a.java
41161 views
/*1* Copyright (c) 2000, 2021, 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.jdi.Accessible.isPackagePrivate;2425import nsk.share.*;26import nsk.share.jpda.*;27import nsk.share.jdi.*;282930/**31* This class is used as debugee application for the JDI test.32*/33public class accipp001a {34boolean z0, z1[]={z0}, z2[][]={z1}, z3[][][]={z2}, z4[][][][]={z3};35byte b0, b1[]={b0}, b2[][]={b1}, b3[][][]={b2}, b4[][][][]={b3};36char c0, c1[]={c0}, c2[][]={c1}, c3[][][]={c2}, c4[][][][]={c3};37double d0, d1[]={d0}, d2[][]={d1}, d3[][][]={d2}, d4[][][][]={d3};38float f0, f1[]={f0}, f2[][]={f1}, f3[][][]={f2}, f4[][][][]={f3};39int i0, i1[]={i0}, i2[][]={i1}, i3[][][]={i2}, i4[][][][]={i3};40long l0, l1[]={l0}, l2[][]={l1}, l3[][][]={l2}, l4[][][][]={l3};41short s0, s1[]={s0}, s2[][]={s1}, s3[][][]={s2}, s4[][][][]={s3};4243Boolean Z0 = Boolean.valueOf(true), Z1[] ={Z0}, Z2[][]={Z1}, Z3[][][]={Z2}, Z4[][][][]={Z3};44Byte B0 = Byte.valueOf("0"), B1[] ={B0}, B2[][]={B1}, B3[][][]={B2}, B4[][][][]={B3};45Character C0 = Character.valueOf('0'), C1[] ={C0}, C2[][]={C1}, C3[][][]={C2}, C4[][][][]={C3};46Double D0 = Double.valueOf(0), D1[] ={D0}, D2[][]={D1}, D3[][][]={D2}, D4[][][][]={D3};47Float F0 = Float.valueOf(0), F1[] ={F0}, F2[][]={F1}, F3[][][]={F2}, F4[][][][]={F3};48Integer I0 = Integer.valueOf(0), I1[] ={I0}, I2[][]={I1}, I3[][][]={I2}, I4[][][][]={I3};49Long L0 = Long.valueOf(0), L1[] ={L0}, L2[][]={L1}, L3[][][]={L2}, L4[][][][]={L3};50Short Sh0 = Short.valueOf("1"), Sh1[]={Sh0}, Sh2[][]={Sh1}, Sh3[][][]={Sh2}, Sh4[][][][]={Sh3};51String S0 = new String(" "), S1[] ={S0}, S2[][]={S1}, S3[][][]={S2}, S4[][][][]={S3};52Object O0 = new Object(), O1[] ={O0}, O2[][]={O1}, O3[][][]={O2}, O4[][][][]={O3};5354private static class U {} // private ==> package private55protected static class V {}56public static class W {}57static class P {} // package private5859U u0=new U(), u1[]={u0}, u2[][]={u1}, u3[][][]={u2}, u4[][][][]={u3};60V v0=new V(), v1[]={v0}, v2[][]={v1}, v3[][][]={v2}, v4[][][][]={v3};61W w0=new W(), w1[]={w0}, w2[][]={w1}, w3[][][]={w2}, w4[][][][]={w3};62P p0=new P(), p1[]={p0}, p2[][]={p1}, p3[][][]={p2}, p4[][][][]={p3};6364accipp001a a0, a1[]={}, a2[][]={}, a3[][][]={}, a4[][][][]={};6566accipp001e e0=new accipp001e() , e1[]={e0}, e2[][]={e1}, e3[][][]={e2}, e4[][][][]={e3};6768public static void main (String args[]) {69accipp001a a = new accipp001a();70ArgumentHandler argHandler = new ArgumentHandler(args);71IOPipe pipe = argHandler.createDebugeeIOPipe();72pipe.println("ready");73String instruction = pipe.readln();74if (instruction.equals("quit"))75System.exit(95);76System.err.println("# Debugee: unknown instruction: " + instruction);77System.exit(97);78}79}8081/** Sample package-private class. */82class accipp001e {}838485