DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
inputFactory = XMLInputFactory.newInstance();
outputFactory = XMLOutputFactory.newInstance();
// Create a monitor
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = new DefaultMonitorFactoryImpl();
if (monitorFactory != null) {
monitor = monitorFactory.createMonitor();
utilities.addUtility(monitorFactory);
}
StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory, monitor);