Given a method defined on a (3rd party, so I can't just move it) Scala package object, like so:
package foo
package object bar {
def doSomething(s: String): String = ???
}
I need to call doSomething from Java code. I know that in general, I can get at a Scala companion object's methods from Java using ScalaObject$.method(). However, the example above compiles to foo.bar.package$.class, and of course Java screams about package being a reserved word.
Is there a way to call this from Java directly?