try {
Constructor<T> constructor = clazz.getConstructor(constructorArgTypes);
return postProcess(newInstance(constructor, constructorArgs));
}
catch (SecurityException e) {
throw new StripesRuntimeException("Could not instantiate " + clazz, e);
}
catch (NoSuchMethodException e) {
throw new StripesRuntimeException("Could not instantiate " + clazz, e);
}
catch (IllegalArgumentException e) {
throw new StripesRuntimeException("Could not instantiate " + clazz, e);
}
}