Java Curiously Recurring Template Pattern experiment for multiple inheritance