I want to return from a Java method a reference to a Scala object. How can I do that?
My Scala objects are like this:
trait Environment 
object LocalEnvironment extends Environment {...}
object ServerEnvironment extends Environment {...}
... and I want my Java method to be like this:
Environment getEnvironment() { return LocalEnvironment; }  // DOES NOT COMPILE
Is there a way to do this?
 
     
    