public static <T extends SomeSuperClass> T getSomeObject(Class <T>t) { try { return t.newInstance(); } catch (Exception e) { return null; } }