Source Code Cross Referenced for CompilerException.java in  » Installer » IzPack » com » izforge » izpack » compiler » 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 » Installer » IzPack » com.izforge.izpack.compiler 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
003:         * 
004:         * http://izpack.org/
005:         * http://izpack.codehaus.org/
006:         * 
007:         * Copyright 2001,2002 Marcus Stursberg
008:         * 
009:         * Licensed under the Apache License, Version 2.0 (the "License");
010:         * you may not use this file except in compliance with the License.
011:         * You may obtain a copy of the License at
012:         * 
013:         *     http://www.apache.org/licenses/LICENSE-2.0
014:         *     
015:         * Unless required by applicable law or agreed to in writing, software
016:         * distributed under the License is distributed on an "AS IS" BASIS,
017:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018:         * See the License for the specific language governing permissions and
019:         * limitations under the License.
020:         */
021:
022:        package com.izforge.izpack.compiler;
023:
024:        /**
025:         * Indicates a Failure to compile.
026:         * 
027:         * @author Marcus Stursberg
028:         */
029:        public class CompilerException extends java.io.IOException {
030:
031:            static final long serialVersionUID = 6247426753392546734L;
032:
033:            /**
034:             * The throwable that caused this throwable to get thrown, or null if this throwable was not
035:             * caused by another throwable, or if the causative throwable is unknown. If this field is equal
036:             * to this throwable itself, it indicates that the cause of this throwable has not yet been
037:             * initialized.
038:             */
039:            private Throwable _cause = this ;
040:
041:            /**
042:             * Construct a new exception with the specified message.
043:             * 
044:             * @param message Description of the error
045:             */
046:            public CompilerException(String message) {
047:                super (message);
048:            }
049:
050:            /**
051:             * Construct a new exception with the specified message and wraps another cause.
052:             * 
053:             * @param message Description of the error
054:             * @param cause Throwable
055:             */
056:            public CompilerException(String message, Throwable cause) {
057:                super (message);
058:                this ._cause = cause;
059:            }
060:
061:            /**
062:             * Initializes the <i>cause</i> of this throwable to the specified value. (The cause is the
063:             * throwable that caused this throwable to get thrown.)
064:             * 
065:             * <p>
066:             * This method can be called at most once. It is generally called from within the constructor,
067:             * or immediately after creating the throwable. If this throwable was created with {@link
068:             * #CompilerException(String,Throwable)}, this method cannot be called even once.
069:             * 
070:             * @param cause the cause (which is saved for later retrieval by the {@link #getCause()}
071:             * method). (A <code>null</code> value is permitted, and indicates that the cause is
072:             * nonexistent or unknown.)
073:             * @return a reference to this <code>Throwable</code> instance.
074:             * @throws IllegalArgumentException if <code>cause</code> is this throwable. (A throwable
075:             * cannot be its own cause.)
076:             * @throws IllegalStateException if this throwable was created with {@link
077:             * #CompilerException(String,Throwable)}, or this method has already been called on this
078:             * throwable.
079:             */
080:            public synchronized Throwable initCause(Throwable cause) {
081:                if (this ._cause != this )
082:                    throw new IllegalStateException("Can't overwrite cause");
083:                if (cause == this )
084:                    throw new IllegalArgumentException(
085:                            "Self-causation not permitted");
086:                this ._cause = cause;
087:                return this ;
088:            }
089:
090:            /**
091:             * Returns the cause of this throwable or <code>null</code> if the cause is nonexistent or
092:             * unknown. (The cause is the throwable that caused this throwable to get thrown.)
093:             * 
094:             * <p>
095:             * This implementation returns the cause that was supplied via one of the constructors requiring
096:             * a <code>Throwable</code>, or that was set after creation with the
097:             * {@link #initCause(Throwable)} method. While it is typically unnecessary to override this
098:             * method, a subclass can override it to return a cause set by some other means. This is
099:             * appropriate for a "legacy chained throwable" that predates the addition of chained exceptions
100:             * to <code>Throwable</code>. Note that it is <i>not</i> necessary to override any of the
101:             * <code>PrintStackTrace</code> methods, all of which invoke the <code>getCause</code>
102:             * method to determine the cause of a throwable.
103:             * 
104:             * @return the cause of this throwable or <code>null</code> if the cause is nonexistent or
105:             * unknown.
106:             */
107:            public Throwable getCause() {
108:                return (_cause == this ? null : _cause);
109:            }
110:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.