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


001:        /*******************************************************************************
002:         * Copyright (c) 2000, 2006 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.jdt.internal.compiler.classfmt;
011:
012:        import java.io.PrintStream;
013:        import java.io.PrintWriter;
014:
015:        public class ClassFormatException extends Exception {
016:
017:            public static final int ErrBadMagic = 1;
018:            public static final int ErrBadMinorVersion = 2;
019:            public static final int ErrBadMajorVersion = 3;
020:            public static final int ErrBadConstantClass = 4;
021:            public static final int ErrBadConstantString = 5;
022:            public static final int ErrBadConstantNameAndType = 6;
023:            public static final int ErrBadConstantFieldRef = 7;
024:            public static final int ErrBadConstantMethodRef = 8;
025:            public static final int ErrBadConstantInterfaceMethodRef = 9;
026:            public static final int ErrBadConstantPoolIndex = 10;
027:            public static final int ErrBadSuperclassName = 11;
028:            public static final int ErrInterfaceCannotBeFinal = 12;
029:            public static final int ErrInterfaceMustBeAbstract = 13;
030:            public static final int ErrBadModifiers = 14;
031:            public static final int ErrClassCannotBeAbstractFinal = 15;
032:            public static final int ErrBadClassname = 16;
033:            public static final int ErrBadFieldInfo = 17;
034:            public static final int ErrBadMethodInfo = 17;
035:            public static final int ErrEmptyConstantPool = 18;
036:            public static final int ErrMalformedUtf8 = 19;
037:            public static final int ErrUnknownConstantTag = 20;
038:            public static final int ErrTruncatedInput = 21;
039:            public static final int ErrMethodMustBeAbstract = 22;
040:            public static final int ErrMalformedAttribute = 23;
041:            public static final int ErrBadInterface = 24;
042:            public static final int ErrInterfaceMustSubclassObject = 25;
043:            public static final int ErrIncorrectInterfaceMethods = 26;
044:            public static final int ErrInvalidMethodName = 27;
045:            public static final int ErrInvalidMethodSignature = 28;
046:
047:            private static final long serialVersionUID = 6667458511042774540L; // backward compatible
048:
049:            private int errorCode;
050:            private int bufferPosition;
051:            private RuntimeException nestedException;
052:            private char[] fileName;
053:
054:            public ClassFormatException(RuntimeException e, char[] fileName) {
055:                this .nestedException = e;
056:                this .fileName = fileName;
057:            }
058:
059:            public ClassFormatException(int code) {
060:                errorCode = code;
061:            }
062:
063:            public ClassFormatException(int code, int bufPos) {
064:                errorCode = code;
065:                bufferPosition = bufPos;
066:            }
067:
068:            /**
069:             * @return int
070:             */
071:            public int getErrorCode() {
072:                return errorCode;
073:            }
074:
075:            /**
076:             * @return int
077:             */
078:            public int getBufferPosition() {
079:                return bufferPosition;
080:            }
081:
082:            /**
083:             * Returns the underlying <code>Throwable</code> that caused the failure.
084:             * 
085:             * @return the wrappered <code>Throwable</code>, or <code>null</code>
086:             *         if the direct case of the failure was at the Java model layer
087:             */
088:            public Throwable getException() {
089:                return this .nestedException;
090:            }
091:
092:            public void printStackTrace() {
093:                printStackTrace(System.err);
094:            }
095:
096:            /**
097:             * Prints this exception's stack trace to the given print stream.
098:             * 
099:             * @param output
100:             *            the print stream
101:             * @since 3.0
102:             */
103:            public void printStackTrace(PrintStream output) {
104:                synchronized (output) {
105:                    super .printStackTrace(output);
106:                    Throwable throwable = getException();
107:                    if (throwable != null) {
108:                        if (this .fileName != null) {
109:                            output.print("Caused in "); //$NON-NLS-1$
110:                            output.print(this .fileName);
111:                            output.print(" by: "); //$NON-NLS-1$
112:                        } else {
113:                            output.print("Caused by: "); //$NON-NLS-1$
114:                        }
115:                        throwable.printStackTrace(output);
116:                    }
117:                }
118:            }
119:
120:            /**
121:             * Prints this exception's stack trace to the given print writer.
122:             * 
123:             * @param output
124:             *            the print writer
125:             * @since 3.0
126:             */
127:            public void printStackTrace(PrintWriter output) {
128:                synchronized (output) {
129:                    super .printStackTrace(output);
130:                    Throwable throwable = getException();
131:                    if (throwable != null) {
132:                        if (this .fileName != null) {
133:                            output.print("Caused in "); //$NON-NLS-1$
134:                            output.print(this .fileName);
135:                            output.print(" by: "); //$NON-NLS-1$
136:                        } else {
137:                            output.print("Caused by: "); //$NON-NLS-1$
138:                        }
139:                        throwable.printStackTrace(output);
140:                    }
141:                }
142:            }
143:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.