257258259260261262263264265266267
try { T component; ObjectFactory objectFactory = getObjectFactory(); if (objectFactory != null) { component = objectFactory.newInstance((Class<T>) clazz); } else { component = (T) clazz.newInstance(); }