public ResourceResolver getApplicationResolver() {
return applicationResolver;
}
};
plugin.setApplication(descriptor);
ServiceDescriptor pluginDescriptor = plugin.init(pluginContext);
if (pluginDescriptor != null) {
pluginDescriptors.put(plugin.getName(), pluginDescriptor);
}
}
//
for (Iterator<String> i = plugins.keySet().iterator();i.hasNext();) {
String name = i.next();
if (!pluginDescriptors.containsKey(name)) {
i.remove();
}
}
// Bind the plugins
for (Service service : plugins.values()) {
// Bind the plugin as a bean
Class aClass = service.getClass();
Object o = service;
injector.bindBean(aClass, null, o);
}
// Bind the beans
for (ServiceDescriptor pluginDescriptor : pluginDescriptors.values()) {
for (BeanDescriptor bean : pluginDescriptor.getBeans()) {
bean.bind(injector);
}
}
// Bind the application descriptor