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