I know the code below doesn't compile, and yes I might be crazy. What I'm trying to do is slip an implementation (B below) of a abstract class (A) as the super class of class (C) that also extends the abstract class. I'd also like to defer method override to the super class. Something like...
abstract class A {
abstract Object get();
abstract Object do();
Object action();
}
class B extends A {
B(B obj) {
super(obj.getName()...)
}
Object get() { ... }
Object do() { ... }
}
C<T> extends <T extends A> {
C(<T extends A> obj) {
super(obj)
}
Object do() { ... }
Object whatever() {
return action();
}
}
Where...
C aC = new aC(new B());
aC.get() -> B.get()
aC.do() -> C.do()
aC.action() -> A.action()