I'm doing quite a bit of Fantom again and using lots of Java FFI.
Once again I keep running in the case where java libraries use overloading (turn out many if not most do) ... and that means i can't use those methods
I can manually making java shells with a different name.
I know at some point there was some discussion of using a facet or something to be able to "define" the right method to pick without having to have fantom actually have to "resolve it" which is slow and painful.
Did that go anywhere ?
I do seem to run into this issue frequently.
brianTue 19 Apr 2011
Once again I keep running in the case where java libraries use overloading (turn out many if not most do) ... and that means i can't use those methods
The only restriction is that you can't subclass a Java class that does overloading, and then override an overloaded method in your subclass.
There should be nothing from stopping you from calling overloaded Java methods in your Fantom code. The compiler uses pretty much the same rules as Java to pick the right one. Although since there are implicit conversions going on, you might have to explicit cast in certain occasions.
tcolarTue 19 Apr 2011
OK, then i don't know whats the deal, either I'm missing something or there is a bug.
I've even tried to cast/type everything, but still get an error
tcolar Tue 19 Apr 2011
I'm doing quite a bit of Fantom again and using lots of Java FFI.
Once again I keep running in the case where java libraries use overloading (turn out many if not most do) ... and that means i can't use those methods
I can manually making java shells with a different name.
I know at some point there was some discussion of using a facet or something to be able to "define" the right method to pick without having to have fantom actually have to "resolve it" which is slow and painful.
Did that go anywhere ?
I do seem to run into this issue frequently.
brian Tue 19 Apr 2011
The only restriction is that you can't subclass a Java class that does overloading, and then override an overloaded method in your subclass.
There should be nothing from stopping you from calling overloaded Java methods in your Fantom code. The compiler uses pretty much the same rules as Java to pick the right one. Although since there are implicit conversions going on, you might have to explicit cast in certain occasions.
tcolar Tue 19 Apr 2011
OK, then i don't know whats the deal, either I'm missing something or there is a bug.
I've even tried to cast/type everything, but still get an error
Error:
Here is the javadoc: http://download.oracle.com/javase/1.4.2/docs/api/javax/naming/directory/InitialDirContext.html#createSubcontext(java.lang.String, javax.naming.directory.Attributes)
tcolar Tue 19 Apr 2011
Sorry .. me tired ....
createSubcontext
notcreateSubContext
vkuzkokov Tue 19 Apr 2011
createSubcontext
has lowercasec