I have a Java method of the form
public interface JavaInterface< T extends A >{
static < T extends A > JavaInterface< T > callThis(){
//I want to call this in scala
}
}
In Scala I write
val x = JavaInterface[SomeClass].callThis()
but I get an error telling me it "is not a value". How do I call that static method in Scala?
You want:
val x = JavaInterface.callThis[SomeClass]()
It's the method, not the type, that's parameterised for static methods.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments