001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: *
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: */
018:
019: /**
020: * @author Anatoly F. Bondarenko
021: * @version $Revision: 1.2 $
022: */
023:
024: /**
025: * Created on 13.07.2005
026: */package org.apache.harmony.jpda.tests.jdwp.ObjectReference;
027:
028: import org.apache.harmony.jpda.tests.share.JPDADebuggeeSynchronizer;
029: import org.apache.harmony.jpda.tests.share.SyncDebuggee;
030:
031: public class GetValues003Debuggee extends SyncDebuggee {
032:
033: static GetValues003Debuggee testedObject;
034:
035: int intArrayField[]; // JDWP_TAG_ARRAY = 91
036: GetValues003Debuggee objectArrayField[]; // JDWP_TAG_ARRAY = 91
037: GetValues003Debuggee objectField; // JDWP_TAG_OBJECT = 76
038: String stringField; // JDWP_TAG_STRING = 115
039: Thread threadField; // JDWP_TAG_THREAD = 116
040: ThreadGroup threadGroupField; // JDWP_TAG_THREAD_GROUP = 103
041: Class classField; // JDWP_TAG_CLASS_OBJECT = 99
042: ClassLoader classLoaderField; // DWP_TAG_CLASS_LOADER = 108
043:
044: public void run() {
045: logWriter.println("--> Debuggee: GetValues003Debuggee: START");
046: testedObject = new GetValues003Debuggee();
047:
048: testedObject.intArrayField = new int[1];
049: testedObject.intArrayField[0] = 999;
050: testedObject.objectArrayField = new GetValues003Debuggee[1];
051: testedObject.objectArrayField[0] = new GetValues003Debuggee();
052: testedObject.objectField = new GetValues003Debuggee();
053: testedObject.stringField = "stringField";
054: testedObject.threadField = new GetValues003DebuggeeThread();
055: testedObject.threadGroupField = new ThreadGroup(
056: "ThreadGroupName");
057: testedObject.classField = GetValues003Debuggee.class;
058: testedObject.classLoaderField = testedObject.classField
059: .getClassLoader();
060:
061: testedObject.intArrayField = null;
062: testedObject.objectArrayField = null;
063: testedObject.objectField = null;
064: testedObject.stringField = null;
065: testedObject.threadField = null;
066: testedObject.threadGroupField = null;
067: testedObject.classField = null;
068: testedObject.classLoaderField = null;
069:
070: logWriter
071: .println("\n--> Debuggee: GetValues003Debuggee: Before ObjectReference::GetValues command:");
072: logWriter.println("--> intArrayField value = "
073: + testedObject.intArrayField);
074: logWriter.println("--> objectArrayField value = "
075: + testedObject.objectArrayField);
076: logWriter.println("--> objectField value = "
077: + testedObject.objectField);
078: logWriter.println("--> stringField value = "
079: + testedObject.stringField);
080: logWriter.println("--> threadField value = "
081: + testedObject.threadField);
082: logWriter.println("--> threadGroupField value = "
083: + testedObject.threadGroupField);
084: logWriter.println("--> classField value = "
085: + testedObject.classField);
086: logWriter.println("--> classLoaderField value = "
087: + testedObject.classLoaderField);
088:
089: synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY);
090:
091: synchronizer
092: .receiveMessage(JPDADebuggeeSynchronizer.SGNL_CONTINUE);
093:
094: logWriter.println("--> Debuggee: GetValues003Debuggee: FINISH");
095: }
096:
097: public static void main(String[] args) {
098: runDebuggee(GetValues003Debuggee.class);
099: }
100: }
101:
102: class GetValues003DebuggeeThread extends Thread {
103: public void myMethod() {
104: }
105: }
|