Source Code Cross Referenced for JdwpReplyPacket.java in  » IDE-Eclipse » jdt » org » eclipse » jdi » internal » spy » 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 » IDE Eclipse » jdt » org.eclipse.jdi.internal.spy 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2000, 2005 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         * 
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *******************************************************************************/package org.eclipse.jdi.internal.spy;
011:
012:        import java.io.DataInputStream;
013:        import java.io.DataOutputStream;
014:        import java.io.IOException;
015:        import java.lang.reflect.Field;
016:        import java.lang.reflect.Modifier;
017:        import java.util.HashMap;
018:        import java.util.Map;
019:
020:        /**
021:         * This class implements the corresponding Java Debug Wire Protocol (JDWP) packet
022:         * declared by the JDWP specification.
023:         *
024:         */
025:        public class JdwpReplyPacket extends JdwpPacket {
026:            /** Error code constants. */
027:            public static final short NONE = 0;
028:            public static final short INVALID_THREAD = 10;
029:            public static final short INVALID_THREAD_GROUP = 11;
030:            public static final short INVALID_PRIORITY = 12;
031:            public static final short THREAD_NOT_SUSPENDED = 13;
032:            public static final short THREAD_SUSPENDED = 14;
033:            public static final short INVALID_OBJECT = 20;
034:            public static final short INVALID_CLASS = 21;
035:            public static final short CLASS_NOT_PREPARED = 22;
036:            public static final short INVALID_METHODID = 23;
037:            public static final short INVALID_LOCATION = 24;
038:            public static final short INVALID_FIELDID = 25;
039:            public static final short INVALID_FRAMEID = 30;
040:            public static final short NO_MORE_FRAMES = 31;
041:            public static final short OPAQUE_FRAME = 32;
042:            public static final short NOT_CURRENT_FRAME = 33;
043:            public static final short TYPE_MISMATCH = 34;
044:            public static final short INVALID_SLOT = 35;
045:            public static final short DUPLICATE = 40;
046:            public static final short NOT_FOUND = 41;
047:            public static final short INVALID_MONITOR = 50;
048:            public static final short NOT_MONITOR_OWNER = 51;
049:            public static final short INTERRUPT = 52;
050:            public static final short INVALID_CLASS_FORMAT = 60;
051:            public static final short CIRCULAR_CLASS_DEFINITION = 61;
052:            public static final short FAILS_VERIFICATION = 62;
053:            public static final short ADD_METHOD_NOT_IMPLEMENTED = 63;
054:            public static final short SCHEMA_CHANGE_NOT_IMPLEMENTED = 64;
055:            public static final short INVALID_TYPESTATE = 65;
056:            public static final short HIERARCHY_CHANGE_NOT_IMPLEMENTED = 66;
057:            public static final short DELETE_METHOD_NOT_IMPLEMENTED = 67;
058:            public static final short UNSUPPORTED_VERSION = 68;
059:            public static final short NAMES_DONT_MATCH = 69;
060:            public static final short CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED = 70;
061:            public static final short METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED = 71;
062:            public static final short NOT_IMPLEMENTED = 99;
063:            public static final short NULL_POINTER = 100;
064:            public static final short ABSENT_INFORMATION = 101;
065:            public static final short INVALID_EVENT_TYPE = 102;
066:            public static final short ILLEGAL_ARGUMENT = 103;
067:            public static final short OUT_OF_MEMORY = 110;
068:            public static final short ACCESS_DENIED = 111;
069:            public static final short VM_DEAD = 112;
070:            public static final short INTERNAL = 113;
071:            public static final short UNATTACHED_THREAD = 115;
072:            public static final short INVALID_TAG = 500;
073:            public static final short ALREADY_INVOKING = 502;
074:            public static final short INVALID_INDEX = 503;
075:            public static final short INVALID_LENGTH = 504;
076:            public static final short INVALID_STRING = 506;
077:            public static final short INVALID_CLASS_LOADER = 507;
078:            public static final short INVALID_ARRAY = 508;
079:            public static final short TRANSPORT_LOAD = 509;
080:            public static final short TRANSPORT_INIT = 510;
081:            public static final short NATIVE_METHOD = 511;
082:            public static final short INVALID_COUNT = 512;
083:            public static final short HCR_OPERATION_REFUSED = 900; // HCR specific.
084:
085:            /** Mapping of error codes to strings. */
086:            private static HashMap fErrorMap = null;
087:
088:            /** JDWP Error code. */
089:            private short fErrorCode;
090:
091:            /**
092:             * Creates new JdwpReplyPacket.
093:             */
094:            public JdwpReplyPacket() {
095:                setFlags(FLAG_REPLY_PACKET);
096:            }
097:
098:            /**
099:             * @return Returns JDWP Error code.
100:             */
101:            public short errorCode() {
102:                return fErrorCode;
103:            }
104:
105:            /**
106:             * Assigns JDWP Error code.
107:             */
108:            public void setErrorCode(short newValue) {
109:                fErrorCode = newValue;
110:            }
111:
112:            /**
113:             * Reads header fields that are specific for this type of packet.
114:             */
115:            protected void readSpecificHeaderFields(DataInputStream dataInStream)
116:                    throws IOException {
117:                fErrorCode = dataInStream.readShort();
118:            }
119:
120:            /**
121:             * Writes header fields that are specific for this type of packet.
122:             */
123:            protected void writeSpecificHeaderFields(
124:                    DataOutputStream dataOutStream) throws IOException {
125:                dataOutStream.writeShort(fErrorCode);
126:            }
127:
128:            /**
129:             * Retrieves constant mappings.
130:             */
131:            public static void getConstantMaps() {
132:                if (fErrorMap != null) {
133:                    return;
134:                }
135:
136:                Field[] fields = JdwpReplyPacket.class.getDeclaredFields();
137:                fErrorMap = new HashMap(fields.length);
138:                for (int i = 0; i < fields.length; i++) {
139:                    Field field = fields[i];
140:                    if ((field.getModifiers() & Modifier.PUBLIC) == 0
141:                            || (field.getModifiers() & Modifier.STATIC) == 0
142:                            || (field.getModifiers() & Modifier.FINAL) == 0)
143:                        continue;
144:
145:                    try {
146:                        Integer intValue = new Integer(field.getInt(null));
147:                        fErrorMap.put(intValue, field.getName());
148:                    } catch (IllegalAccessException e) {
149:                        // Will not occur for own class.
150:                    } catch (IllegalArgumentException e) {
151:                        // Should not occur.
152:                        // We should take care that all public static final constants
153:                        // in this class are numbers that are convertible to int.
154:                    }
155:                }
156:            }
157:
158:            /**
159:             * @return Returns a map with string representations of error codes.
160:             */
161:            public static Map errorMap() {
162:                getConstantMaps();
163:                return fErrorMap;
164:            }
165:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.