I have an abstract class that has a shared method which creates a new instance of that class. I don't want to make a new instance of the actual abstract class (you can't do that anyway) but of the implementing subclass.
In order to do it I'm doing this:
constructor = this.getClass().getConstructor(String.class,String.class);
Object[] params = new Object[2];
params[0] = "one";
params[1]= "two";
Object piece = constructor.newInstance(params);
Is there a less wordy way to do this