Type aliasing Java classes with statics
问题 Suppose MyClass is a class defined in Java, and has many static as well as non-static members. I tried to alias this class (and associated companion object) in a Scala object MyObject as shown below: object MyObject { import javastuff._ type MyAlias = MyClass val MyAlias = MyClass } Scalac complains: error: object MyClass is not a value val MyAlias = MyClass How do I work around this? Thanks. 回答1: Although this works in pure Scala for a class + companion object, it's not possible with Java's