Source Code Cross Referenced for SetValues004Debuggee.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » jpda » tests » jdwp » ObjectReference » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » org package » org.apache.harmony.jpda.tests.jdwp.ObjectReference 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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 SetValues004Debuggee extends SyncDebuggee {
032:
033:            static String passedStatus = "PASSED";
034:            static String failedStatus = "FAILED";
035:            static String status = passedStatus;
036:
037:            static SetValues004Debuggee testedObject;
038:
039:            int intArrayField[]; // JDWP_TAG_ARRAY = 91
040:            SetValues004Debuggee objectArrayField[]; // JDWP_TAG_ARRAY = 91
041:            SetValues004Debuggee objectField; // JDWP_TAG_OBJECT = 76
042:            String stringField; // JDWP_TAG_STRING = 115
043:            Thread threadField; // JDWP_TAG_THREAD = 116
044:            ThreadGroup threadGroupField; // JDWP_TAG_THREAD_GROUP = 103
045:            Class classField; // JDWP_TAG_CLASS_OBJECT = 99
046:            ClassLoader classLoaderField; // DWP_TAG_CLASS_LOADER = 108
047:
048:            public void run() {
049:
050:                logWriter.println("--> Debuggee: SetValues004Debuggee: START");
051:                testedObject = new SetValues004Debuggee();
052:
053:                testedObject.intArrayField = new int[1];
054:                testedObject.intArrayField[0] = 999;
055:                testedObject.objectArrayField = new SetValues004Debuggee[1];
056:                testedObject.objectArrayField[0] = new SetValues004Debuggee();
057:                testedObject.objectField = new SetValues004Debuggee();
058:                testedObject.stringField = "stringField";
059:                testedObject.threadField = new SetValues004DebuggeeThread();
060:                testedObject.threadGroupField = new ThreadGroup(
061:                        "ThreadGroupName");
062:                testedObject.classField = SetValues004Debuggee.class;
063:                testedObject.classLoaderField = testedObject.classField
064:                        .getClassLoader();
065:
066:                logWriter
067:                        .println("\n--> Debuggee: SetValues004Debuggee: Before ObjectReference::SetValues command:");
068:                logWriter.println("--> intArrayField value = "
069:                        + testedObject.intArrayField);
070:                logWriter.println("--> objectArrayField value = "
071:                        + testedObject.objectArrayField);
072:                logWriter.println("--> objectField value = "
073:                        + testedObject.objectField);
074:                logWriter.println("--> stringField value = "
075:                        + testedObject.stringField);
076:                logWriter.println("--> threadField value = "
077:                        + testedObject.threadField);
078:                logWriter.println("--> threadGroupField value = "
079:                        + testedObject.threadGroupField);
080:                logWriter.println("--> classField value = "
081:                        + testedObject.classField);
082:                logWriter.println("--> classLoaderField value = "
083:                        + testedObject.classLoaderField);
084:
085:                synchronizer.sendMessage(JPDADebuggeeSynchronizer.SGNL_READY);
086:                synchronizer
087:                        .receiveMessage(JPDADebuggeeSynchronizer.SGNL_CONTINUE);
088:
089:                logWriter
090:                        .println("\n--> Debuggee: SetValues004Debuggee: After ObjectReference::SetValues command:");
091:                logWriter.println("--> intArrayField value = "
092:                        + testedObject.intArrayField);
093:                if (testedObject.intArrayField != null) {
094:                    logWriter
095:                            .println("##> Debuggee: FAILURE: Unexpected value");
096:                    logWriter.println("##> Expected value = " + null);
097:                    status = failedStatus;
098:                } else {
099:                    logWriter.println("--> Debuggee: OK. Expected value");
100:                }
101:
102:                logWriter.println("--> objectArrayField value = "
103:                        + testedObject.objectArrayField);
104:                if (testedObject.objectArrayField != null) {
105:                    logWriter
106:                            .println("##> Debuggee: FAILURE: Unexpected value");
107:                    logWriter.println("##> Expected value = " + null);
108:                    status = failedStatus;
109:                } else {
110:                    logWriter.println("--> Debuggee: OK. Expected value");
111:                }
112:
113:                logWriter.println("--> objectField value = "
114:                        + testedObject.objectField);
115:                if (testedObject.objectField != null) {
116:                    logWriter
117:                            .println("##> Debuggee: FAILURE: Unexpected value");
118:                    logWriter.println("##> Expected value = " + null);
119:                    status = failedStatus;
120:                } else {
121:                    logWriter.println("--> Debuggee: OK. Expected value");
122:                }
123:
124:                logWriter.println("--> stringField value = "
125:                        + testedObject.stringField);
126:                if (testedObject.stringField != null) {
127:                    logWriter
128:                            .println("##> Debuggee: FAILURE: Unexpected value");
129:                    logWriter.println("##> Expected value = " + null);
130:                    status = failedStatus;
131:                } else {
132:                    logWriter.println("--> Debuggee: OK. Expected value");
133:                }
134:
135:                logWriter.println("--> threadField value = "
136:                        + testedObject.threadField);
137:                if (testedObject.threadField != null) {
138:                    logWriter
139:                            .println("##> Debuggee: FAILURE: Unexpected value");
140:                    logWriter.println("##> Expected value = " + null);
141:                    status = failedStatus;
142:                } else {
143:                    logWriter.println("--> Debuggee: OK. Expected value");
144:                }
145:
146:                logWriter.println("--> threadGroupField value = "
147:                        + testedObject.threadGroupField);
148:                if (testedObject.threadGroupField != null) {
149:                    logWriter
150:                            .println("##> Debuggee: FAILURE: Unexpected value");
151:                    logWriter.println("##> Expected value = " + null);
152:                    status = failedStatus;
153:                } else {
154:                    logWriter.println("--> Debuggee: OK. Expected value");
155:                }
156:
157:                logWriter.println("--> classField value = "
158:                        + testedObject.classField);
159:                if (testedObject.classField != null) {
160:                    logWriter
161:                            .println("##> Debuggee: FAILURE: Unexpected value");
162:                    logWriter.println("##> Expected value = " + null);
163:                    status = failedStatus;
164:                } else {
165:                    logWriter.println("--> Debuggee: OK. Expected value");
166:                }
167:
168:                logWriter.println("--> classLoaderField value = "
169:                        + testedObject.classLoaderField);
170:                if (testedObject.classLoaderField != null) {
171:                    logWriter
172:                            .println("##> Debuggee: FAILURE: Unexpected value");
173:                    logWriter.println("##> Expected value = " + null);
174:                    status = failedStatus;
175:                } else {
176:                    logWriter.println("--> Debuggee: OK. Expected value");
177:                }
178:
179:                if (status.equals(failedStatus)) {
180:                    logWriter.println("\n##> Debuggee: Check status = FAILED");
181:                } else {
182:                    logWriter.println("\n--> Debuggee: Check status = PASSED");
183:                }
184:
185:                logWriter
186:                        .println("--> Debuggee: Send check status for SetValues004Test...\n");
187:                synchronizer.sendMessage(status);
188:
189:                logWriter.println("--> Debuggee: SetValues004Debuggee: FINISH");
190:            }
191:
192:            public static void main(String[] args) {
193:                runDebuggee(SetValues004Debuggee.class);
194:            }
195:        }
196:
197:        class SetValues004DebuggeeThread extends Thread {
198:            public void myMethod() {
199:            }
200:        }
w_w__w.___j__a_v_a__2__s.___c_o__m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.