-
Notifications
You must be signed in to change notification settings - Fork 13
/
Throwable.swift
305 lines (208 loc) · 13.9 KB
/
Throwable.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// class java.lang.Throwable ///
open class Throwable: JavaObject, /* interface java.io.Serializable */ UnavailableProtocol {
public convenience init?( casting object: JavaObject, _ file: StaticString = #file, _ line: Int = #line ) {
self.init( javaObject: nil )
object.withJavaObject {
self.javaObject = $0
}
}
private static var ThrowableJNIClass: jclass?
/// static final boolean java.lang.Throwable.$assertionsDisabled
// Skipping field: true false false false false false
/// private static final java.lang.String java.lang.Throwable.CAUSE_CAPTION
/// private static final java.lang.Throwable[] java.lang.Throwable.EMPTY_THROWABLE_ARRAY
/// private static final java.lang.String java.lang.Throwable.NULL_CAUSE_MESSAGE
/// private static final java.lang.String java.lang.Throwable.SELF_SUPPRESSION_MESSAGE
/// private static final java.lang.String java.lang.Throwable.SUPPRESSED_CAPTION
/// private static final java.util.List java.lang.Throwable.SUPPRESSED_SENTINEL
/// private static final java.lang.StackTraceElement[] java.lang.Throwable.UNASSIGNED_STACK
/// private static final long java.lang.Throwable.serialVersionUID
/// private java.lang.Throwable java.lang.Throwable.cause
/// private java.lang.String java.lang.Throwable.detailMessage
/// private java.lang.StackTraceElement[] java.lang.Throwable.stackTrace
/// private java.util.List java.lang.Throwable.suppressedExceptions
/// public java.lang.Throwable()
private static var new_MethodID_1: jmethodID?
public convenience init() {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __object = JNIMethod.NewObject( className: "java/lang/Throwable", classCache: &Throwable.ThrowableJNIClass, methodSig: "()V", methodCache: &Throwable.new_MethodID_1, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
/// public java.lang.Throwable(java.lang.String)
private static var new_MethodID_2: jmethodID?
public convenience init( arg0: String? ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: arg0, locals: &__locals )
let __object = JNIMethod.NewObject( className: "java/lang/Throwable", classCache: &Throwable.ThrowableJNIClass, methodSig: "(Ljava/lang/String;)V", methodCache: &Throwable.new_MethodID_2, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
public convenience init( _ _arg0: String? ) {
self.init( arg0: _arg0 )
}
/// public java.lang.Throwable(java.lang.String,java.lang.Throwable)
private static var new_MethodID_3: jmethodID?
public convenience init( arg0: String?, arg1: Throwable? ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = JNIType.toJava( value: arg0, locals: &__locals )
__args[1] = JNIType.toJava( value: arg1, locals: &__locals )
let __object = JNIMethod.NewObject( className: "java/lang/Throwable", classCache: &Throwable.ThrowableJNIClass, methodSig: "(Ljava/lang/String;Ljava/lang/Throwable;)V", methodCache: &Throwable.new_MethodID_3, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
public convenience init( _ _arg0: String?, _ _arg1: Throwable? ) {
self.init( arg0: _arg0, arg1: _arg1 )
}
/// protected java.lang.Throwable(java.lang.String,java.lang.Throwable,boolean,boolean)
private static var new_MethodID_4: jmethodID?
public convenience init( arg0: String?, arg1: Throwable?, arg2: Bool, arg3: Bool ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 4 )
__args[0] = JNIType.toJava( value: arg0, locals: &__locals )
__args[1] = JNIType.toJava( value: arg1, locals: &__locals )
__args[2] = jvalue( z: jboolean(arg2 ? JNI_TRUE : JNI_FALSE) )
__args[3] = jvalue( z: jboolean(arg3 ? JNI_TRUE : JNI_FALSE) )
let __object = JNIMethod.NewObject( className: "java/lang/Throwable", classCache: &Throwable.ThrowableJNIClass, methodSig: "(Ljava/lang/String;Ljava/lang/Throwable;ZZ)V", methodCache: &Throwable.new_MethodID_4, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
public convenience init( _ _arg0: String?, _ _arg1: Throwable?, _ _arg2: Bool, _ _arg3: Bool ) {
self.init( arg0: _arg0, arg1: _arg1, arg2: _arg2, arg3: _arg3 )
}
/// public java.lang.Throwable(java.lang.Throwable)
private static var new_MethodID_5: jmethodID?
public convenience init( arg0: Throwable? ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: arg0, locals: &__locals )
let __object = JNIMethod.NewObject( className: "java/lang/Throwable", classCache: &Throwable.ThrowableJNIClass, methodSig: "(Ljava/lang/Throwable;)V", methodCache: &Throwable.new_MethodID_5, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
public convenience init( _ _arg0: Throwable? ) {
self.init( arg0: _arg0 )
}
/// public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable)
private static var addSuppressed_MethodID_6: jmethodID?
open func addSuppressed( arg0: Throwable? ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: arg0, locals: &__locals )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "addSuppressed", methodSig: "(Ljava/lang/Throwable;)V", methodCache: &Throwable.addSuppressed_MethodID_6, args: &__args, locals: &__locals )
}
open func addSuppressed( _ _arg0: Throwable? ) {
addSuppressed( arg0: _arg0 )
}
/// private native java.lang.Throwable java.lang.Throwable.fillInStackTrace(int)
/// public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()
private static var fillInStackTrace_MethodID_7: jmethodID?
open func fillInStackTrace() -> Throwable! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "fillInStackTrace", methodSig: "()Ljava/lang/Throwable;", methodCache: &Throwable.fillInStackTrace_MethodID_7, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
return __return != nil ? Throwable( javaObject: __return ) : nil
}
/// public synchronized java.lang.Throwable java.lang.Throwable.getCause()
private static var getCause_MethodID_8: jmethodID?
open func getCause() -> Throwable! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getCause", methodSig: "()Ljava/lang/Throwable;", methodCache: &Throwable.getCause_MethodID_8, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
return __return != nil ? Throwable( javaObject: __return ) : nil
}
/// public java.lang.String java.lang.Throwable.getLocalizedMessage()
private static var getLocalizedMessage_MethodID_9: jmethodID?
open func getLocalizedMessage() -> String! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getLocalizedMessage", methodSig: "()Ljava/lang/String;", methodCache: &Throwable.getLocalizedMessage_MethodID_9, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
return __return != nil ? String( javaObject: __return ) : nil
}
/// public java.lang.String java.lang.Throwable.getMessage()
private static var getMessage_MethodID_10: jmethodID?
open func getMessage() -> String! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getMessage", methodSig: "()Ljava/lang/String;", methodCache: &Throwable.getMessage_MethodID_10, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
return __return != nil ? String( javaObject: __return ) : nil
}
/// private synchronized java.lang.StackTraceElement[] java.lang.Throwable.getOurStackTrace()
/// public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
private static var getStackTrace_MethodID_11: jmethodID?
open func getStackTrace() -> [/* class java.lang.StackTraceElement */ UnavailableObject]! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getStackTrace", methodSig: "()[Ljava/lang/StackTraceElement;", methodCache: &Throwable.getStackTrace_MethodID_11, args: &__args, locals: &__locals )
return JNIType.toSwift( type: [/* class java.lang.StackTraceElement */ UnavailableObject].self, from: __return )
}
/// native int java.lang.Throwable.getStackTraceDepth()
// Skipping method: true false false false false
/// native java.lang.StackTraceElement java.lang.Throwable.getStackTraceElement(int)
// Skipping method: true false false false false
/// public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()
private static var getSuppressed_MethodID_12: jmethodID?
open func getSuppressed() -> [Throwable]! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getSuppressed", methodSig: "()[Ljava/lang/Throwable;", methodCache: &Throwable.getSuppressed_MethodID_12, args: &__args, locals: &__locals )
return JNIType.toSwift( type: [Throwable].self, from: __return )
}
/// public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable)
private static var initCause_MethodID_13: jmethodID?
open func initCause( arg0: Throwable? ) -> Throwable! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: arg0, locals: &__locals )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "initCause", methodSig: "(Ljava/lang/Throwable;)Ljava/lang/Throwable;", methodCache: &Throwable.initCause_MethodID_13, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
return __return != nil ? Throwable( javaObject: __return ) : nil
}
open func initCause( _ _arg0: Throwable? ) -> Throwable! {
return initCause( arg0: _arg0 )
}
/// private void java.lang.Throwable.printEnclosedStackTrace(java.lang.Throwable$PrintStreamOrWriter,java.lang.StackTraceElement[],java.lang.String,java.lang.String,java.util.Set)
/// private void java.lang.Throwable.printStackTrace(java.lang.Throwable$PrintStreamOrWriter)
/// public void java.lang.Throwable.printStackTrace(java.io.PrintWriter)
private static var printStackTrace_MethodID_14: jmethodID?
open func printStackTrace( arg0: /* class java.io.PrintWriter */ UnavailableObject? ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: arg0, locals: &__locals )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "printStackTrace", methodSig: "(Ljava/io/PrintWriter;)V", methodCache: &Throwable.printStackTrace_MethodID_14, args: &__args, locals: &__locals )
}
open func printStackTrace( _ _arg0: /* class java.io.PrintWriter */ UnavailableObject? ) {
printStackTrace( arg0: _arg0 )
}
/// public void java.lang.Throwable.printStackTrace(java.io.PrintStream)
/// public void java.lang.Throwable.printStackTrace()
private static var printStackTrace_MethodID_15: jmethodID?
open func printStackTrace() {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "printStackTrace", methodSig: "()V", methodCache: &Throwable.printStackTrace_MethodID_15, args: &__args, locals: &__locals )
}
/// private void java.lang.Throwable.readObject(java.io.ObjectInputStream) throws java.io.IOException,java.lang.ClassNotFoundException
/// public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])
private static var setStackTrace_MethodID_16: jmethodID?
open func setStackTrace( arg0: [/* class java.lang.StackTraceElement */ UnavailableObject]? ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: arg0, locals: &__locals )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "setStackTrace", methodSig: "([Ljava/lang/StackTraceElement;)V", methodCache: &Throwable.setStackTrace_MethodID_16, args: &__args, locals: &__locals )
}
open func setStackTrace( _ _arg0: [/* class java.lang.StackTraceElement */ UnavailableObject]? ) {
setStackTrace( arg0: _arg0 )
}
/// public java.lang.String java.lang.Throwable.toString()
// Skipping method: false true false false false
/// private synchronized void java.lang.Throwable.writeObject(java.io.ObjectOutputStream) throws java.io.IOException
}