You ask:
So where is the official Java documentation, if any, on this concept?
If your method returns an object, you can call another method on the returned object, simple as that. All of the methods above return this
, and so if method1, method2, and method3 all return this
you can do this:
MyClass myVar = new MyClass().method1().method2().method3();
which is the same as:
MyClass myVar = new MyClass();
myVar.method1();
myVar.method2();
myVar.method3();
The documentation for Java method invocation can be found in the JLS Section 15.12.