What is the analog in Scala of doing this in Java:
public class Outer {
private Inner inner;
public static class Inner {
}
public Inner getInner()
As others have pointed out, "static" classes should be placed inside the companion object.
In Scala, classes, traits, and objects which are members of a class are path-dependent. For example:
class Button {
class Click
}
val ok = new Button
val cancel = new Button
val c1 = new ok.Click
val c2 = new cancel.Click
Now c1 and c2 are instances of -different- classes. One class is ok.Click, and the other is cancel.Click. If you wanted to refer to the type of all Click classes, you could say Button#Click.