Object[] arguments = new Object[params.length];
arguments[0] = this;
Constructor<?> constructor = clazz.getConstructor(params);
return (AbstractParserFactory)constructor.newInstance(arguments);
} catch (NoSuchMethodException e) {
throw new ConfigurationException("The parser factory '"+clazz.getName()+"' cannot be initialized. ", e);
} catch (InstantiationException e) {
throw new ConfigurationException("The parser factory '"+clazz.getName()+"' cannot be initialized. ", e);
} catch (IllegalAccessException e) {
throw new ConfigurationException("The parser factory '"+clazz.getName()+"' cannot be initialized. ", e);
} catch (InvocationTargetException e) {
throw new ConfigurationException("The parser factory '"+clazz.getName()+"' cannot be initialized. ", e);
}
}