How to access a Java static method from Scala given a type alias for that class it resides in
Given the type-alias type Cal = java.util.Calendar how can the static getInstance method be accessed? I tried the following in Scala REPL: scala> type Cal = java.util.Calendar defined type alias Cal scala> Cal.getInstance <console>:8: error: not found: value Cal Cal.getInstance ^ scala> val Cal = java.util.Calendar <console>:7: error: object Calendar is not a value val Cal = java.util.Calendar ^ Is import java.util.{Calendar => Cal} followed by import Cal._ really my best bet? You can't. Yes, import java.util.{Calendar => Cal} is really your best bet. Conceptually, Scala object members are