Examine the code below
public abstract class ClassA<ClassBType extends ClassB<ClassCType>,ClassCType extends ClassC> {
public void method(ClassBType type) {
type.myClassA = this; //Error. Type mismatch: cannot convert from TestGameMain.ClassA<ClassBType,ClassCType> to TestGameMain.ClassA<TestGameMain.ClassB<ClassCType>,ClassCType>
}
}
public abstract class ClassB<ClassCType extends ClassC> {
ClassA<ClassB<ClassCType>,ClassCType> myClassA;
private void testMethod() {
myClassA.method(this);
}
}
public abstract class ClassC {}
}
What's the correct way to fix this problem?
Edit: I've updated the code above, which does not compile.