Is something like this possible?
class A {
this someMethod() {
// code
return this;
}
}
class B extends A {
}
B b = new B();
B b2 = b.someMethod();
This in the most simple way possible.