jextract: Organize java known functional interfaces#844
Conversation
| @@ -1691,7 +1691,7 @@ extension JNISwift2JavaGenerator { | |||
|
|
|||
| let methodName = | |||
| if parameters.isEmpty && nativeResult.javaType.isVoid { | |||
There was a problem hiding this comment.
I'd like this to be if let known = KnownJavaFunctionalInterface(method, nativeResult.javaType) { ... } else { "apply" } maybe, so centralize the matching the signatures to the types
There was a problem hiding this comment.
I updated it to depend on parameters and result types, not sure if there is a better syntax or a way to do this
47ef6ed to
f2c1a81
Compare
|
Digging through this a bit more, the shape we want is more like: because I want the type name, method name, and types all in one place, rather than spread out in the other funcs. Hope you don't mind if I apply this small change and we merge this; looking forward to follow ups handling the other types! |
|
I also noticed the functional interface usage isn't really complete... We're still emitting the |
I don't mind, and I can do that too :D |
Yes, I mentioned that here Will handle it in follow-up |
|
Would you want to do the follow up please? Inside before we do we need to guard it like Would you make a follow up PR with that please? |
|
Thanks! |
Yes, I will. I just wanted to make them small incremental changes so we can easily review and merge them in short iterations, and I can get a review of the language features to use :D Thanks |
Organize the Java known functional interfaces information in one place
Issue #811