@@ -57,7 +57,7 @@ SwiftJava's `swift-java jextract` tool automates generating Java bindings from S
5757| Typed throws: ` func x() throws(E) ` | ❌ | ❌ |
5858| Stored properties: ` var ` , ` let ` (with ` willSet ` , ` didSet ` ) | ✅ | ✅ |
5959| Computed properties: ` var ` (incl. ` throws ` ) | ✅ / TODO | ✅ |
60- | Async functions ` func async ` and properties: ` var { get async {} } ` | ❌ | ❌ |
60+ | Async functions ` func async ` and properties: ` var { get async {} } ` | ❌ | ✅ |
6161| Arrays: ` [UInt8] ` , ` [T] ` | ❌ | ❌ |
6262| Dictionaries: ` [String: Int] ` , ` [K:V] ` | ❌ | ❌ |
6363| Generic parameters in functions: ` func f<T: A & B>(x: T) ` | ❌ | ✅ |
@@ -97,7 +97,6 @@ SwiftJava's `swift-java jextract` tool automates generating Java bindings from S
9797| Result builders | ❌ | ❌ |
9898| Automatic Reference Counting of class types / lifetime safety | ✅ | ✅ |
9999| Value semantic types (e.g. struct copying) | ❌ | ❌ |
100- | Swift concurrency: ` func async ` , ` actor ` , ` distribued actor ` | ❌ | ❌ |
101100| | | |
102101| | | |
103102
@@ -329,18 +328,20 @@ which conform a to a given Swift protocol.
329328#### Returning protocol types
330329Protocols are not yet supported as return types.
331330
332- ### ` async ` methods
331+ ### ` async ` functions
333332
334- > Note: Importing ` async ` methods is currently only available in the JNI mode of jextract.
333+ > Note: Importing ` async ` functions is currently only available in the JNI mode of jextract.
335334
336- Asynchronous methods in Swift can be extraced using different modes, which are explained in detail below.
335+ Asynchronous functions in Swift can be extraced using different modes, which are explained below.
337336
338- #### Async mode: completable-future (default)
337+ #### Async function mode: completable-future (default)
339338
340- In this mode ` async ` methods in Swift are extracted as methods returning a ` java.util.concurrent.CompletableFuture ` .
339+ In this mode ` async ` functions in Swift are extracted as Java methods returning a ` java.util.concurrent.CompletableFuture ` .
341340This mode gives the most flexibility and should be prefered if your platform supports ` CompletableFuture ` .
342341
343342#### Async mode: future
344343
345344This is a mode for legacy platforms, where ` CompletableFuture ` is not available, such as Android 23 and below.
346- In this mode ` async ` methods in Swift are extracted as methods returning a ` java.util.concurrent.Future ` .
345+ In this mode ` async ` functions in Swift are extracted as Java methods returning a ` java.util.concurrent.Future ` .
346+ To enable this mode pass the ` --async-func-mode future ` command line option,
347+ or set the ` asyncFuncMode ` configuration value in ` swift-java.config `
0 commit comments