You want that there is only one constructor, and that with the same signature.
That could in a costly way done with reflection, at run-time.
public BaseClass(String s, String t, int n) {
Class> cl = getClass();
do {
check(cl);
cl = cl.getSuperclass();
} while (cl != BaseClass.class);
}
private void check(Class> cl) {
if (cl.getConstructors().length != 1) {
throw new IllegalStateException("Needs only 1 constructor in: " + cl.getName());
}
try {
cl.getConstructor(String.class, String.class, int.class);
} catch (NoSuchMethodException e) {
throw new IllegalStateException("Constructor should have parameter types (String, String, int) in: " + cl.getName());
}
}
Not advisable
However you could make a factory to be used that hides class hierarchies. Or in fact use a single class that delegates to your class hierarchy (has a member of your class).