File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
JavaSwiftKitDemo/src/main/java Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 13
13
//===----------------------------------------------------------------------===//
14
14
15
15
package com .example .swift ;
16
+
16
17
import com .example .swift .HelloSwift ;
17
18
18
19
public class HelloSubclass extends HelloSwift {
Original file line number Diff line number Diff line change 13
13
//===----------------------------------------------------------------------===//
14
14
15
15
package com .example .swift ;
16
+
16
17
import com .example .swift .HelloSubclass ;
17
18
18
19
public class HelloSwift {
Original file line number Diff line number Diff line change @@ -200,14 +200,13 @@ public static void globalCallJavaCallback(Runnable callMe) {
200
200
var mh$ = globalCallJavaCallback .HANDLE ;
201
201
202
202
try {
203
+ // signature of 'void run()'
203
204
FunctionDescriptor callMe_run_desc = FunctionDescriptor .ofVoid (
204
- // replicate signature of run()
205
205
);
206
206
MethodHandle callMe_run_handle = MethodHandles .lookup ()
207
207
.findVirtual (Runnable .class ,
208
208
"run" ,
209
- callMe_run_desc .toMethodType ()
210
- );
209
+ callMe_run_desc .toMethodType ());
211
210
callMe_run_handle = callMe_run_handle .bindTo (callMe ); // set the first parameter to the Runnable as the "this" of the callback pretty much
212
211
213
212
try (Arena arena = Arena .ofConfined ()) {
You can’t perform that action at this time.
0 commit comments