A standard approach/workaround/solution is to add a class
object to the constructor(s), like:
public class Foo {
private Class type;
public Foo(Class type) {
this.type = type;
}
public Class getType() {
return type;
}
public T newInstance() {
return type.newInstance();
}
}