abstract class X> {
protected X(Class implClazz) {
if (!getClass().equals(implClazz)) {
throw new IllegalArgumentException();
}
}
abstract I someMethod();
}
Rationale: You can not refer to the dynamic type in type bounds, hence the indirect check in the constructor.