01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: *
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: /**
20: * @author Anatoly F. Bondarenko
21: * @version $Revision: 1.2 $
22: */
23:
24: /**
25: * Created on 13.07.2005
26: */package org.apache.harmony.jpda.tests.jdwp.ReferenceType;
27:
28: import org.apache.harmony.jpda.tests.share.JPDADebuggeeSynchronizer;
29: import org.apache.harmony.jpda.tests.share.SyncDebuggee;
30:
31: public class GetValues005Debuggee extends SyncDebuggee {
32:
33: static int intArrayField[]; // JDWP_TAG_ARRAY = 91
34: static GetValues005Debuggee objectArrayField[]; // JDWP_TAG_ARRAY = 91
35: static GetValues005Debuggee objectField; // JDWP_TAG_OBJECT = 76
36: static String stringField; // JDWP_TAG_STRING = 115
37: static Thread threadField; // JDWP_TAG_THREAD = 116
38: static ThreadGroup threadGroupField; // JDWP_TAG_THREAD_GROUP = 103
39: static Class classField; // JDWP_TAG_CLASS_OBJECT = 99
40: static ClassLoader classLoaderField; // DWP_TAG_CLASS_LOADER = 108
41:
42: public void run() {
43: logWriter.println("--> Debuggee: GetValues005Debuggee: START");
44:
45: intArrayField = new int[1];
46: intArrayField[0] = 999;
47: objectArrayField = new GetValues005Debuggee[1];
48: objectArrayField[0] = new GetValues005Debuggee();
49: objectField = new GetValues005Debuggee();
50: stringField = "stringField";
51: threadField = new GetValues005DebuggeeThread();
52: threadGroupField = new ThreadGroup("ThreadGroupName");
53: classField = GetValues005Debuggee.class;
54: classLoaderField = classField.getClassLoader();
55:
56: intArrayField = null;
57: objectArrayField = null;
58: objectField = null;
59: stringField = null;
60: threadField = null;
61: threadGroupField = null;
62: classField = null;
63: classLoaderField = null;
64:
65: logWriter
66: .println("\n--> Debuggee: GetValues005Debuggee: Before ReferenceType::GetValues command:");
67: logWriter.println("--> intArrayField value = " + intArrayField);
68: logWriter.println("--> objectArrayField value = "
69: + objectArrayField);
70: logWriter.println("--> objectField value = " + objectField);
71: logWriter.println("--> stringField value = " + stringField);
72: logWriter.println("--> threadField value = " + threadField);
73: logWriter.println("--> threadGroupField value = "
74: + threadGroupField);
75: logWriter.println("--> classField value = " + classField);
76: logWriter.println("--> classLoaderField value = "
77: + classLoaderField);
78:
79: synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY);
80:
81: synchronizer
82: .receiveMessage(JPDADebuggeeSynchronizer.SGNL_CONTINUE);
83:
84: logWriter.println("--> Debuggee: GetValues005Debuggee: FINISH");
85: }
86:
87: public static void main(String[] args) {
88: runDebuggee(GetValues005Debuggee.class);
89: }
90: }
91:
92: class GetValues005DebuggeeThread extends Thread {
93: public void myMethod() {
94: }
95: }
|