public <T> T newInstance(Constructor<T> constructor, Object... params) {
try {
return postProcess(constructor.newInstance(params));
}
catch (InstantiationException e) {
throw new StripesRuntimeException("Could not invoke constructor " + constructor, e);
}
catch (IllegalAccessException e) {
throw new StripesRuntimeException("Could not invoke constructor " + constructor, e);
}
catch (InvocationTargetException e) {
throw new StripesRuntimeException("Could not invoke constructor " + constructor, e);
}
}