• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 only, as
8  * published by the Free Software Foundation.  Oracle designates this
9  * particular file as subject to the "Classpath" exception as provided
10  * by Oracle in the LICENSE file that accompanied this code.
11  *
12  * This code is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15  * version 2 for more details (a copy is included in the LICENSE file that
16  * accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License version
19  * 2 along with this work; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23  * or visit www.oracle.com if you need additional information or have any
24  * questions.
25  */
26 
27 package java.lang;
28 
29 import dalvik.annotation.compat.UnsupportedAppUsage;
30 
31 @SuppressWarnings({"unchecked", "deprecation", "all"})
32 public class Throwable implements java.io.Serializable {
33 
Throwable()34     public Throwable() {
35         throw new RuntimeException("Stub!");
36     }
37 
Throwable(java.lang.String message)38     public Throwable(java.lang.String message) {
39         throw new RuntimeException("Stub!");
40     }
41 
Throwable(java.lang.String message, java.lang.Throwable cause)42     public Throwable(java.lang.String message, java.lang.Throwable cause) {
43         throw new RuntimeException("Stub!");
44     }
45 
Throwable(java.lang.Throwable cause)46     public Throwable(java.lang.Throwable cause) {
47         throw new RuntimeException("Stub!");
48     }
49 
Throwable( java.lang.String message, java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace)50     protected Throwable(
51             java.lang.String message,
52             java.lang.Throwable cause,
53             boolean enableSuppression,
54             boolean writableStackTrace) {
55         throw new RuntimeException("Stub!");
56     }
57 
getMessage()58     public java.lang.String getMessage() {
59         throw new RuntimeException("Stub!");
60     }
61 
getLocalizedMessage()62     public java.lang.String getLocalizedMessage() {
63         throw new RuntimeException("Stub!");
64     }
65 
getCause()66     public synchronized java.lang.Throwable getCause() {
67         throw new RuntimeException("Stub!");
68     }
69 
initCause(java.lang.Throwable cause)70     public synchronized java.lang.Throwable initCause(java.lang.Throwable cause) {
71         throw new RuntimeException("Stub!");
72     }
73 
toString()74     public java.lang.String toString() {
75         throw new RuntimeException("Stub!");
76     }
77 
printStackTrace()78     public void printStackTrace() {
79         throw new RuntimeException("Stub!");
80     }
81 
printStackTrace(java.io.PrintStream s)82     public void printStackTrace(java.io.PrintStream s) {
83         throw new RuntimeException("Stub!");
84     }
85 
86     @UnsupportedAppUsage
printStackTrace(java.lang.Throwable.PrintStreamOrWriter s)87     private void printStackTrace(java.lang.Throwable.PrintStreamOrWriter s) {
88         throw new RuntimeException("Stub!");
89     }
90 
printEnclosedStackTrace( java.lang.Throwable.PrintStreamOrWriter s, java.lang.StackTraceElement[] enclosingTrace, java.lang.String caption, java.lang.String prefix, java.util.Set<java.lang.Throwable> dejaVu)91     private void printEnclosedStackTrace(
92             java.lang.Throwable.PrintStreamOrWriter s,
93             java.lang.StackTraceElement[] enclosingTrace,
94             java.lang.String caption,
95             java.lang.String prefix,
96             java.util.Set<java.lang.Throwable> dejaVu) {
97         throw new RuntimeException("Stub!");
98     }
99 
printStackTrace(java.io.PrintWriter s)100     public void printStackTrace(java.io.PrintWriter s) {
101         throw new RuntimeException("Stub!");
102     }
103 
fillInStackTrace()104     public synchronized java.lang.Throwable fillInStackTrace() {
105         throw new RuntimeException("Stub!");
106     }
107 
108     @UnsupportedAppUsage
nativeFillInStackTrace()109     private static native java.lang.Object nativeFillInStackTrace();
110 
getStackTrace()111     public java.lang.StackTraceElement[] getStackTrace() {
112         throw new RuntimeException("Stub!");
113     }
114 
115     @UnsupportedAppUsage
getOurStackTrace()116     private synchronized java.lang.StackTraceElement[] getOurStackTrace() {
117         throw new RuntimeException("Stub!");
118     }
119 
setStackTrace(java.lang.StackTraceElement[] stackTrace)120     public void setStackTrace(java.lang.StackTraceElement[] stackTrace) {
121         throw new RuntimeException("Stub!");
122     }
123 
nativeGetStackTrace( java.lang.Object stackState)124     private static native java.lang.StackTraceElement[] nativeGetStackTrace(
125             java.lang.Object stackState);
126 
readObject(java.io.ObjectInputStream s)127     private void readObject(java.io.ObjectInputStream s)
128             throws java.lang.ClassNotFoundException, java.io.IOException {
129         throw new RuntimeException("Stub!");
130     }
131 
writeObject(java.io.ObjectOutputStream s)132     private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
133         throw new RuntimeException("Stub!");
134     }
135 
addSuppressed(java.lang.Throwable exception)136     public final synchronized void addSuppressed(java.lang.Throwable exception) {
137         throw new RuntimeException("Stub!");
138     }
139 
getSuppressed()140     public final synchronized java.lang.Throwable[] getSuppressed() {
141         throw new RuntimeException("Stub!");
142     }
143 
144     private static final java.lang.String CAUSE_CAPTION = "Caused by: ";
145 
146     private static java.lang.Throwable[] EMPTY_THROWABLE_ARRAY;
147 
148     private static final java.lang.String NULL_CAUSE_MESSAGE = "Cannot suppress a null exception.";
149 
150     private static final java.lang.String SELF_SUPPRESSION_MESSAGE =
151             "Self-suppression not permitted";
152 
153     private static final java.lang.String SUPPRESSED_CAPTION = "Suppressed: ";
154 
155     @UnsupportedAppUsage
156     private transient volatile java.lang.Object backtrace;
157 
158     @UnsupportedAppUsage
159     private java.lang.Throwable cause;
160 
161     @UnsupportedAppUsage
162     private java.lang.String detailMessage;
163 
164     private static final long serialVersionUID = -3042686055658047285L; // 0xd5c635273977b8cbL
165 
166     @UnsupportedAppUsage
167     private java.lang.StackTraceElement[] stackTrace;
168 
169     @UnsupportedAppUsage
170     private java.util.List<java.lang.Throwable> suppressedExceptions;
171 
172     @SuppressWarnings({"unchecked", "deprecation", "all"})
173     private abstract static class PrintStreamOrWriter {
174 
PrintStreamOrWriter()175         private PrintStreamOrWriter() {
176             throw new RuntimeException("Stub!");
177         }
178 
lock()179         abstract java.lang.Object lock();
180 
println(java.lang.Object o)181         abstract void println(java.lang.Object o);
182     }
183 
184     @SuppressWarnings({"unchecked", "deprecation", "all"})
185     private static class SentinelHolder {
186 
SentinelHolder()187         private SentinelHolder() {
188             throw new RuntimeException("Stub!");
189         }
190 
191         public static final java.lang.StackTraceElement STACK_TRACE_ELEMENT_SENTINEL;
192 
193         static {
194             STACK_TRACE_ELEMENT_SENTINEL = null;
195         }
196 
197         public static final java.lang.StackTraceElement[] STACK_TRACE_SENTINEL;
198 
199         static {
200             STACK_TRACE_SENTINEL = new java.lang.StackTraceElement[0];
201         }
202     }
203 
204     @SuppressWarnings({"unchecked", "deprecation", "all"})
205     private static class WrappedPrintStream extends java.lang.Throwable.PrintStreamOrWriter {
206 
WrappedPrintStream(java.io.PrintStream printStream)207         WrappedPrintStream(java.io.PrintStream printStream) {
208             throw new RuntimeException("Stub!");
209         }
210 
lock()211         java.lang.Object lock() {
212             throw new RuntimeException("Stub!");
213         }
214 
println(java.lang.Object o)215         void println(java.lang.Object o) {
216             throw new RuntimeException("Stub!");
217         }
218 
219         private final java.io.PrintStream printStream;
220 
221         {
222             printStream = null;
223         }
224     }
225 
226     @SuppressWarnings({"unchecked", "deprecation", "all"})
227     private static class WrappedPrintWriter extends java.lang.Throwable.PrintStreamOrWriter {
228 
WrappedPrintWriter(java.io.PrintWriter printWriter)229         WrappedPrintWriter(java.io.PrintWriter printWriter) {
230             throw new RuntimeException("Stub!");
231         }
232 
lock()233         java.lang.Object lock() {
234             throw new RuntimeException("Stub!");
235         }
236 
println(java.lang.Object o)237         void println(java.lang.Object o) {
238             throw new RuntimeException("Stub!");
239         }
240 
241         private final java.io.PrintWriter printWriter;
242 
243         {
244             printWriter = null;
245         }
246     }
247 }
248