Is
public abstract class BaseClass<X extends SecondClass, T extends FirstClass, U extends BaseAnother<X>> {that no?
(I added X extends SecondClass )
Consider how to use this type variable. A way to declare this when a class definition is the way to it in new BaseClass< /* type parameters - here */> { ... }.
Also note that according to JLS , type parameters are declared in the class definition in one place:
NormalClassDeclaration: ClassModifiersopt TypeParametersopt Superopt Interfacesopt ClassBody
. 8.1.2. :
interface ConvertibleTo<T> {
T convert();
}
class ReprChange<T extends ConvertibleTo<S>,
S extends ConvertibleTo<T>> {
T t;
void set(S s) { t = s.convert(); }
S get() { return t.convert(); }
}