throw new IllegalStateException(e);
}
// Load data bindings
for (ServiceDeclaration visitorDeclaration: visitorDeclarations) {
JavaInterfaceVisitor visitor = null;
try {
Class<JavaInterfaceVisitor> visitorClass = (Class<JavaInterfaceVisitor>)visitorDeclaration.loadClass();
try {
Constructor<JavaInterfaceVisitor> constructor = visitorClass.getConstructor(ExtensionPointRegistry.class);
visitor = constructor.newInstance(registry);
} catch (NoSuchMethodException e) {
visitor = visitorClass.newInstance();
}
} catch (Exception e) {
IllegalStateException ie = new IllegalStateException(e);
throw ie;
}
logger.fine("Adding Java Interface visitor: " + visitor.getClass().getName());
addInterfaceVisitor(visitor);
}
loadedVisitors = true;