I understand that you can create a new class with parameters from a string with the following construct:
Class<? extends Base> newClass = (Class<? extends Base>)Class.forName(className);
Constructor<? extends Base> c = newClass.getConstructor(new Class[] {Manager.class, Integer.TYPE});
Base a = c.newInstance(new Object[] {this, new Integer(0)});
But I don’t believe there to be a way to ensure subclasses of Base implements the constructor used.
Is there any practice to handling this situation?
Constructors are not like regular methods: You can’t declare an abstract constructor that a child has to implement. In other words, you don’t get to mandate how a child class may be instantiated. In OO philosophy, that’s not within the base class’s responsibilities.
If you want, you can create an abstract initializing method, like axtavt suggested, and call it from your base class’s constructor. Then you at least know that it will get called.
You can also check for a constructor with the signature you want. If you don’t find it, you can throw an Exception about how the class doesn’t conform to your terms. In this way, reflection can give you a little more power than is built into the language.