Use Type.createInstance instead of createInstance