-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCallable.swift
More file actions
39 lines (23 loc) · 1.33 KB
/
Callable.swift
File metadata and controls
39 lines (23 loc) · 1.33 KB
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
import java_swift
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// interface java.util.concurrent.Callable ///
public protocol Callable: JavaProtocol {
/// public abstract java.lang.Object java.util.concurrent.Callable.call() throws java.lang.Exception
func call() throws /* java.lang.Exception */ -> java_swift.JavaObject!
}
open class CallableForward: JNIObjectForward, Callable {
private static var CallableJNIClass: jclass?
/// public abstract java.lang.Object java.util.concurrent.Callable.call() throws java.lang.Exception
private static var call_MethodID_2: jmethodID?
open func call() throws /* java.lang.Exception */ -> java_swift.JavaObject! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "call", methodSig: "()Ljava/lang/Object;", methodCache: &CallableForward.call_MethodID_2, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw java_swift.Exception( javaObject: throwable )
}
return __return != nil ? java_swift.JavaObject( javaObject: __return ) : nil
}
}