* Simply instantiates reflectively, does not enhance bytecode etc in any way.
*/
@Override
protected <T> T doInstantiate(final Class<T> cls) throws ObjectInstantiationException {
if (Modifier.isAbstract(cls.getModifiers())) {
throw new ObjectInstantiationException("Cannot create an instance of an abstract class: " + cls);
}
try {
return cls.newInstance();
} catch (final IllegalAccessException e) {
throw new ObjectInstantiationException(e);
} catch (final InstantiationException e) {
throw new ObjectInstantiationException(e);
}
}