} catch (ClassNotFoundException e) {
throw new DeploymentUnitProcessingException("Could not load view class " + view.getViewClassName() + " for component " + configuration, e);
}
final ViewConfiguration viewConfiguration;
if (viewClass.isInterface()) {
viewConfiguration = view.createViewConfiguration(viewClass, configuration, new ProxyFactory(viewClass.getName() + "$$$view" + PROXY_ID.incrementAndGet(), Object.class, viewClass.getClassLoader(), viewClass.getProtectionDomain(), viewClass));
} else {
viewConfiguration = view.createViewConfiguration(viewClass, configuration, new ProxyFactory(viewClass.getName() + "$$$view" + PROXY_ID.incrementAndGet(), viewClass, viewClass.getClassLoader(), viewClass.getProtectionDomain()));
}
for (final ViewConfigurator configurator : view.getConfigurators()) {
configurator.configure(context, configuration, view, viewConfiguration);
}
configuration.getViews().add(viewConfiguration);