You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There was issue #494 mentioning about this, but the situation was different. I am creating a binding library where there are overloaded methods/ctors only different between Java.IO.InputStream adn Java.IO.OutputStream.
Can we map?
Java.IO.InputStream -> System.IO.StreamReader
Java.IO.OutputStream -> System.IO.StreamWriter
The text was updated successfully, but these errors were encountered:
Unfortunately there is no support to opt out of the Java.IO.[Input|Output]Stream -> System.IO.Stream mapping. Likewise you cannot just assign it to a random C# type like System.IO.Stream[Reader|Writer] and expect it to work.
Some things to try:
You can try using managedType on the parameter to force it to be Java.IO.InputStream, etc. But I suspect the generating plumbing code will still try to use System.IO.Stream and it probably won't compile.
For overloaded methods you might could use managedName on the method name to rename them so they are different like ProcessStreamIn () and ProcessStreamOut ().
For overloaded constructors that probably won't work. However if you aren't creating the type in C# you likely don't need both constructors.
Failing all else, you can manually write the binding code and use Java.IO.[Input|Output]Stream instead of System.IO.Stream, though that is a painful route.
Or of course if you don't actually need the methods/ctors in C# you can simply remove them.
jpobst
added
bug
Component does not function as intended
generator
Issues binding a Java library (generator, class-parse, etc.)
labels
Sep 30, 2024
There was issue #494 mentioning about this, but the situation was different. I am creating a binding library where there are overloaded methods/ctors only different between Java.IO.InputStream adn Java.IO.OutputStream.
Can we map?
The text was updated successfully, but these errors were encountered: